diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-27 20:38:53 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-04-27 20:38:53 -0400 |
commit | c926f0a9d8910c67554f053ed0f7902542679f0d (patch) | |
tree | 85db2c4de6f43e4eee491b58b60e233b6b20a16e /lib/sqlalchemy/schema.py | |
parent | 2709ae46884f405d95dc16be0667a6cbbebcfb69 (diff) | |
download | sqlalchemy-c926f0a9d8910c67554f053ed0f7902542679f0d.tar.gz |
plugging away
Diffstat (limited to 'lib/sqlalchemy/schema.py')
-rw-r--r-- | lib/sqlalchemy/schema.py | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/lib/sqlalchemy/schema.py b/lib/sqlalchemy/schema.py index 030c400a7..b53eb8887 100644 --- a/lib/sqlalchemy/schema.py +++ b/lib/sqlalchemy/schema.py @@ -1154,24 +1154,15 @@ class Column(SchemaItem, expression.ColumnClause): nullable=self.nullable, quote=self.quote, _proxies=[self], *fk) - except TypeError as e: -# start Py3K - raise TypeError( - "Could not create a copy of this %r object. " - "Ensure the class includes a _constructor() " - "attribute or method which accepts the " - "standard Column constructor arguments, or " - "references the Column class itself." % self.__class__) from e -# end Py3K -# start Py2K -# raise TypeError( -# "Could not create a copy of this %r object. " -# "Ensure the class includes a _constructor() " -# "attribute or method which accepts the " -# "standard Column constructor arguments, or " -# "references the Column class itself. " -# "Original error: %s" % (self.__class__, e)) -# end Py2K + except TypeError: + util.raise_from_cause( + TypeError( + "Could not create a copy of this %r object. " + "Ensure the class includes a _constructor() " + "attribute or method which accepts the " + "standard Column constructor arguments, or " + "references the Column class itself." % self.__class__) + ) c.table = selectable selectable._columns.add(c) |