1
0
Fork 0
mirror of https://github.com/veekun/pokedex.git synced 2024-08-20 18:16:34 +00:00

Python 2.5 compatibility

This commit is contained in:
a_magical_me 2010-04-25 00:14:29 -07:00
parent b91c813966
commit febfb239fb
5 changed files with 160 additions and 10 deletions

View file

@ -55,8 +55,8 @@ def get_session(options):
session = pokedex.db.connect(engine_uri)
if options.verbose:
print "Connected to database {engine} (from {got_from})" \
.format(engine=session.bind.url, got_from=got_from)
print "Connected to database %(engine)s (from %(got_from)s)" \
% dict(engine=session.bind.url, got_from=got_from)
return session
@ -75,8 +75,8 @@ def get_lookup(options, session=None, recreate=False):
index_dir, got_from = defaults.get_default_index_dir_with_origin()
if options.verbose:
print "Opened lookup index {index_dir} (from {got_from})" \
.format(index_dir=index_dir, got_from=got_from)
print "Opened lookup index %(index_dir)s (from %(got_from)s)" \
% dict(index_dir=index_dir, got_from=got_from)
lookup = pokedex.lookup.PokedexLookup(index_dir, session=session)
@ -97,8 +97,8 @@ def get_csv_directory(options):
if csvdir is None:
csvdir, got_from = defaults.get_default_csv_dir_with_origin()
print "Using CSV directory {csvdir} (from {got_from})" \
.format(csvdir=csvdir, got_from=got_from)
print "Using CSV directory %(csvdir)s (from %(got_from)s)" \
% dict(csvdir=csvdir, got_from=got_from)
return csvdir