From 101da94e1282a410557784272bda58222ac048b4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 23 Apr 2012 18:53:58 -0400 Subject: the callcounts are greater here since object_mapper() has a little more overhead to it now --- lib/sqlalchemy/orm/util.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/sqlalchemy') diff --git a/lib/sqlalchemy/orm/util.py b/lib/sqlalchemy/orm/util.py index f4dfef3d5..3cbe3f84a 100644 --- a/lib/sqlalchemy/orm/util.py +++ b/lib/sqlalchemy/orm/util.py @@ -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) -- cgit v1.2.1