Skip to content

Commit

Permalink
Merge pull request #180 from jsoref/issue178
Browse files Browse the repository at this point in the history
get_executable_lines_for_file: tolerate files that do not compile
  • Loading branch information
inducer committed Apr 15, 2016
2 parents f2cc5db + b611164 commit 49c573c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pudb/lowlevel.py
Expand Up @@ -43,7 +43,12 @@ def get_breakpoint_invalid_reason(filename, lineno):
if not line:
return "Line is beyond end of file."

if lineno not in get_executable_lines_for_file(filename):
try:
executable_lines = get_executable_lines_for_file(filename):
except SyntaxError:
return "File failed to compile."

if lineno not in executable_lines:
return "No executable statement found in line."


Expand Down

0 comments on commit 49c573c

Please sign in to comment.