- # Default to a URI within the package, which was hopefully created at some point
- 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()