summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-10-09 17:20:30 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2014-10-09 17:20:30 -0400
commit81d1e0455a406560be468d1aacc37aa63bb4d717 (patch)
tree8e5289a8ecf3d32de4bc13902831ce8a01c245c9 /lib/sqlalchemy/sql/elements.py
parentc55d10940b1953fce2129e7bcfe1728bea33cd1d (diff)
downloadsqlalchemy-81d1e0455a406560be468d1aacc37aa63bb4d717.tar.gz
- Fixed bug where a fair number of SQL elements within
the sql package would fail to ``__repr__()`` successfully, due to a missing ``description`` attribute that would then invoke a recursion overflow when an internal AttributeError would then re-invoke ``__repr__()``. fixes #3195
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index db14031d2..c38d83106 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -228,6 +228,7 @@ class ClauseElement(Visitable):
is_selectable = False
is_clause_element = True
+ description = None
_order_by_label_element = None
_is_from_container = False
@@ -540,7 +541,7 @@ class ClauseElement(Visitable):
__nonzero__ = __bool__
def __repr__(self):
- friendly = getattr(self, 'description', None)
+ friendly = self.description
if friendly is None:
return object.__repr__(self)
else: