summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/engine/reflection.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-04-15 19:11:29 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-04-15 19:11:29 -0400
commita4032d2929d82af81379893c3d2037ea253e929e (patch)
treee1cac0bc3e8f87027c8b045e403834af411c15a4 /lib/sqlalchemy/engine/reflection.py
parent82d194c9a65b09fef8d52318cbe38e2c84dfd2ca (diff)
downloadsqlalchemy-a4032d2929d82af81379893c3d2037ea253e929e.tar.gz
holy python2.4 batman
Diffstat (limited to 'lib/sqlalchemy/engine/reflection.py')
-rw-r--r--lib/sqlalchemy/engine/reflection.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py
index 56b9eafd8..c66c1645b 100644
--- a/lib/sqlalchemy/engine/reflection.py
+++ b/lib/sqlalchemy/engine/reflection.py
@@ -343,10 +343,10 @@ class Inspector(object):
# Primary keys
pk_cons = self.get_pk_constraint(table_name, schema, **tblkw)
if pk_cons:
- primary_key_constraint = sa_schema.PrimaryKeyConstraint(*[
- table.c[pk] for pk in pk_cons['constrained_columns']
- if pk in table.c
- ], name=pk_cons.get('name'))
+ primary_key_constraint = sa_schema.PrimaryKeyConstraint(name=pk_cons.get('name'),
+ *[table.c[pk] for pk in pk_cons['constrained_columns']
+ if pk in table.c]
+ )
table.append_constraint(primary_key_constraint)