Skip to content

Commit

Permalink
get_breakpoint_invalid_reason: report files that do not compile
Browse files Browse the repository at this point in the history
Fixes issue #178
  • Loading branch information
jsoref committed Apr 14, 2016
1 parent f2cc5db commit b611164
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):

This comment has been minimized.

Copy link
@pquentin

pquentin Apr 16, 2016

Contributor

Is the trailing : expected here?

This comment has been minimized.

Copy link
@inducer

inducer Apr 16, 2016

Owner

Nope, well-spotted. Fixed in 25e87a1.

This comment has been minimized.

Copy link
@jsoref

jsoref Apr 21, 2016

Author Contributor

Sorry :-(

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 b611164

Please sign in to comment.