mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Changed exception syntax to work with Python 2.5.
This commit is contained in:
parent
7347da558a
commit
d997e27112
1 changed files with 2 additions and 2 deletions
|
@ -104,7 +104,7 @@ def command_csvimport(engine_uri, directory='.'):
|
||||||
try:
|
try:
|
||||||
session.add(row)
|
session.add(row)
|
||||||
session.flush()
|
session.flush()
|
||||||
except IntegrityError as e:
|
except IntegrityError, e:
|
||||||
failed_rows.append(row)
|
failed_rows.append(row)
|
||||||
|
|
||||||
# Loop over the failed rows and keep trying to insert them. If a loop
|
# 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!
|
# Success!
|
||||||
del failed_rows[i]
|
del failed_rows[i]
|
||||||
do_another_loop = True
|
do_another_loop = True
|
||||||
except IntegrityError as e:
|
except IntegrityError, e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if failed_rows:
|
if failed_rows:
|
||||||
|
|
Loading…
Reference in a new issue