- # Fall back to the environment, then a URI within the package
- if not uri:
- uri = os.environ.get('POKEDEX_DB_ENGINE', None)
-
- if not uri:
- sqlite_path = pkg_resources.resource_filename('pokedex',
- 'data/pokedex.sqlite')
- uri = 'sqlite:///' + sqlite_path
+ # If we didn't get a uri, fall back to the default
+ if uri is None:
+ uri = engine_args.get(engine_prefix + 'url', None)
+ if uri is None:
+ uri = get_default_db_uri()