projects
/
zzz-pokedex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
b07723b
)
Changed exception syntax to work with Python 2.5.
author
Eevee
<git@veekun.com>
Tue, 28 Jul 2009 15:25:11 +0000
(08:25 -0700)
committer
Eevee
<git@veekun.com>
Tue, 28 Jul 2009 15:25:11 +0000
(08:25 -0700)
pokedex/__init__.py
patch
|
blob
|
history
diff --git
a/pokedex/__init__.py
b/pokedex/__init__.py
index
8437ce4
..
4a731d1
100644
(file)
--- a/
pokedex/__init__.py
+++ b/
pokedex/__init__.py
@@
-104,7
+104,7
@@
def command_csvimport(engine_uri, directory='.'):
try:
session.add(row)
session.flush()
- except IntegrityError
as
e:
+ except IntegrityError
,
e:
failed_rows.append(row)
# Loop over the failed rows and keep trying to insert them. If a loop
@@
-121,7
+121,7
@@
def command_csvimport(engine_uri, directory='.'):
# Success!
del failed_rows[i]
do_another_loop = True
- except IntegrityError
as
e:
+ except IntegrityError
,
e:
pass
if failed_rows: