summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/interfaces.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-04-11 19:37:56 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-04-11 19:37:56 -0400
commit6e2bfaf769c429021d5ab6716f2fcdcd327c2627 (patch)
tree2e55e561c66a45dd1a3c678952a111f216127e7c /lib/sqlalchemy/orm/interfaces.py
parenta0e95869a4a17cc1c162341a05d0c8a04a398f55 (diff)
downloadsqlalchemy-6e2bfaf769c429021d5ab6716f2fcdcd327c2627.tar.gz
Fixed `__repr__()` on mapper property constructs
to work before the object is initialized, so that Sphinx builds with recent Sphinx versions can read them.
Diffstat (limited to 'lib/sqlalchemy/orm/interfaces.py')
-rw-r--r--lib/sqlalchemy/orm/interfaces.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/interfaces.py b/lib/sqlalchemy/orm/interfaces.py
index 62cdb2710..70743624c 100644
--- a/lib/sqlalchemy/orm/interfaces.py
+++ b/lib/sqlalchemy/orm/interfaces.py
@@ -289,7 +289,7 @@ class MapperProperty(_MappedAttribute, _InspectionAttr):
def __repr__(self):
return '<%s at 0x%x; %s>' % (
self.__class__.__name__,
- id(self), self.key)
+ id(self), getattr(self, 'key', 'no key'))
class PropComparator(operators.ColumnOperators):
"""Defines boolean, comparison, and other operators for