1
0
forked from VimPlug/jedi

fixed an index problem with the parser, which could happen with really special code

This commit is contained in:
David Halter
2012-07-12 12:01:28 +02:00
parent 19c7f470ca
commit 12970f80ae
2 changed files with 8 additions and 1 deletions

View File

@@ -1391,7 +1391,7 @@ class PyFuzzyParser(object):
# main scope, so just take the last statement. # main scope, so just take the last statement.
try: try:
s = self.scope.statements[-1].set_next(f) s = self.scope.statements[-1].set_next(f)
except AttributeError: except (AttributeError, IndexError):
# If set_next doesn't exist, just add it. # If set_next doesn't exist, just add it.
s = self.scope.add_statement(f) s = self.scope.add_statement(f)
else: else:

View File

@@ -43,3 +43,10 @@ except AttributeError
finally: finally:
pass pass
#? ['isinstance']
if isi
try:
except TypeError:
#? str()
""