Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Bug 528144 - syntax error in if throws a Python exception instead o…
Browse files Browse the repository at this point in the history
…f a make parsing error
  • Loading branch information
bsmedberg committed Nov 17, 2009
1 parent 19f9d83 commit a334f65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pymake/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ def ifeq(d, offset):
if token == '(':
arg1, t, offset = parsemakesyntax(d, offset, (',',), itermakefilechars)
if t is None:
raise SyntaxError("Expected two arguments in conditional", d.getloc(offset))
raise SyntaxError("Expected two arguments in conditional", d.getloc(d.lend))

arg1.rstrip()

Expand Down
6 changes: 6 additions & 0 deletions tests/if-syntaxerr.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#T returncode: 2

ifeq ($(FOO,VAR))
all:
@echo TEST_FAIL
endif

0 comments on commit a334f65

Please sign in to comment.