Skip to content

Commit

Permalink
Fix subtle bug with error message on Python 2.6 - code to be compiled…
Browse files Browse the repository at this point in the history
… must end in a newline.

closes gh-409
closes gh-424
closes gh-427
closes gh-431
  • Loading branch information
takluyver authored and minrk committed May 11, 2011
1 parent dac760e commit f02a1aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion IPython/core/interactiveshell.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@ def run_cell(self, raw_cell, store_history=True):
prefilter_failed = False prefilter_failed = False
if len(cell.splitlines()) == 1: if len(cell.splitlines()) == 1:
try: try:
cell = self.prefilter_manager.prefilter_lines(cell) cell = self.prefilter_manager.prefilter_line(cell)
except AliasError as e: except AliasError as e:
error(e) error(e)
prefilter_failed=True prefilter_failed=True
Expand Down
4 changes: 2 additions & 2 deletions IPython/lib/tests/test_irunner.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ def testIPython(self):
Automatic calling is: OFF Automatic calling is: OFF
In [8]: cos pi In [8]: cos pi
File "<ipython-input-8-586f1104ea44>", line 1 File "<ipython-input-8-6bd7313dd9a9>", line 1
cos pi cos pi
^ ^
SyntaxError: unexpected EOF while parsing SyntaxError: invalid syntax
In [9]: cos(pi) In [9]: cos(pi)
Expand Down

0 comments on commit f02a1aa

Please sign in to comment.