]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
the callcounts are greater here since object_mapper() has a little more overhead...
authorMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Apr 2012 22:53:58 +0000 (18:53 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 23 Apr 2012 22:53:58 +0000 (18:53 -0400)
lib/sqlalchemy/orm/util.py
test/aaa_profiling/test_orm.py

index f4dfef3d5e0878ab8f84d7066ce5f03a12dced03..3cbe3f84afc320056e0566a159b0c08576bcef0b 100644 (file)
@@ -663,9 +663,7 @@ def object_state(instance):
     """
     try:
         return attributes.instance_state(instance)
-    except exc.UnmappedClassError:
-        raise exc.UnmappedInstanceError(instance)
-    except exc.NO_STATE:
+    except (exc.UnmappedClassError, exc.NO_STATE):
         raise exc.UnmappedInstanceError(instance)
 
 
index e5e04eea8e2d4a79864f2647fbadc2211f3cd02e..8d2c3741079803a7beb5fb8d1a6c1ae9a5ab7ccd 100644 (file)
@@ -70,7 +70,7 @@ class MergeTest(fixtures.MappedTest):
         # third call, merge object already present. almost no calls.
 
         @profiling.function_call_count(variance=0.05,
-                versions={'2.7':11, '2.6':11, '2.5':15, '3': 12})
+                versions={'2.7':14, '2.6':14, '2.5':15, '3': 12})
         def go():
             return sess2.merge(p2, load=False)
         p3 = go()