summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/attributes.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-01-05 04:32:54 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-01-05 04:32:54 +0000
commitef3c04aadb0a415dd7a204ce3358343a4ebd8415 (patch)
tree4c4092c1054ba42924a7539dcfef12fccf4ee51d /lib/sqlalchemy/attributes.py
parent6ea7729bbb7f21cd890a4e125f6482978efcb86d (diff)
downloadsqlalchemy-ef3c04aadb0a415dd7a204ce3358343a4ebd8415.tar.gz
better exception catch
Diffstat (limited to 'lib/sqlalchemy/attributes.py')
-rw-r--r--lib/sqlalchemy/attributes.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/attributes.py b/lib/sqlalchemy/attributes.py
index c04e5e3a1..d84ece1f6 100644
--- a/lib/sqlalchemy/attributes.py
+++ b/lib/sqlalchemy/attributes.py
@@ -270,8 +270,9 @@ class AttributeManager(object):
def get_attribute(self, obj, key, **kwargs):
"""returns the value of an object's scalar attribiute."""
+ h = self.get_history(obj, key, **kwargs)
try:
- return self.get_history(obj, key, **kwargs).getattr()
+ return h.getattr()
except KeyError:
raise AttributeError(key)