]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Don't insist on locals() mutability [ticket:1073]
authorJason Kirtland <jek@discorporate.us>
Thu, 12 Jun 2008 20:09:02 +0000 (20:09 +0000)
committerJason Kirtland <jek@discorporate.us>
Thu, 12 Jun 2008 20:09:02 +0000 (20:09 +0000)
test/orm/extendedattr.py

index a32e57294edef91e9184518e0ef7921870c7c30f..eba9a942236a389fd96d6400292e54393c1a267d 100644 (file)
@@ -61,9 +61,12 @@ class MyClass(object):
         return MyTypesManager(cls)
 
     __sa_instrumentation_manager__ = staticmethod(__sa_instrumentation_manager__)
-    
+
     # This proves SA can handle a class with non-string dict keys
-    locals()[42] = 99   # Don't remove this line!
+    try:
+        locals()[42] = 99   # Don't remove this line!
+    except:
+        pass
 
     def __init__(self, **kwargs):
         for k in kwargs: