From 99d08ba3b3867d640c5e444344812c08118f25ce Mon Sep 17 00:00:00 2001 From: David Glick Date: Thu, 8 Jul 2010 17:42:33 +0000 Subject: [PATCH] confirm that a name check is done for 'except x as y' --- src/RestrictedPython/tests/security_in_syntax26.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/RestrictedPython/tests/security_in_syntax26.py b/src/RestrictedPython/tests/security_in_syntax26.py index f1272cc..8611a27 100644 --- a/src/RestrictedPython/tests/security_in_syntax26.py +++ b/src/RestrictedPython/tests/security_in_syntax26.py @@ -8,3 +8,9 @@ def with_as_bad_name(): def relative_import_as_bad_name(): from .x import y as _leading_underscore + +def except_as_bad_name(): + try: + 1/0 + except Exception as _leading_underscore: + pass