New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't crash on unexpected PY2 except syntax #4011

Merged
merged 5 commits into from Sep 26, 2017
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Diff settings

Always

Just for now

Viewing a subset of changes. View all

Tweak error to be even less specific

  • Loading branch information...
gvanrossum committed Sep 26, 2017
commit 564e7721be99db74f0398d0dec08bfaff6d2bc1d
View
@@ -593,7 +593,7 @@ def try_handler(self,
elif isinstance(item.name, ast27.Name):
vs.append(NameExpr(item.name.id))
else:
self.fail("Sorry, `except <expr>, <tuple or list>` is not supported",
self.fail("Sorry, `except <expr>, <anything but a name>` is not supported",
item.lineno, item.col_offset)
vs.append(None)
types = [self.visit(h.type) for h in handlers]
ProTip! Use n and p to navigate between commits in a pull request.