From: Petr Viktorin Date: Sat, 12 Mar 2011 14:46:04 +0000 (+0200) Subject: Fix connect() without arguments X-Git-Tag: veekun-promotions/2011041101~35^2~6 X-Git-Url: http://git.veekun.com/zzz-pokedex.git/commitdiff_plain/065e4d71cc745fa5e07188d97f2375a8c915c59a?ds=sidebyside;hp=586edf1bf1859d42b77cca0979aa69df20e14e5e Fix connect() without arguments --- diff --git a/pokedex/db/__init__.py b/pokedex/db/__init__.py index 0da8713..13e9a19 100644 --- a/pokedex/db/__init__.py +++ b/pokedex/db/__init__.py @@ -15,7 +15,7 @@ def connect(uri=None, session_args={}, engine_args={}, engine_prefix=''): # If we didn't get a uri, fall back to the default if uri is None: - uri = engine_args[engine_prefix + 'url'] + uri = engine_args.get(engine_prefix + 'url', None) if uri is None: uri = get_default_db_uri()