Skip to content
Snippets Groups Projects
Verified Commit 63cff5b3 authored by Antoine R. Dumont's avatar Antoine R. Dumont
Browse files

lister.cli: Fix broken imports

parent d88f1b60
No related branches found
No related tags found
No related merge requests found
......@@ -26,19 +26,19 @@ def cli(db_url, lister, create_tables, drop_tables):
override_conf = {'lister_db_url': db_url}
if lister == 'github':
from .github import models
from .github.models import IndexingModelBase as ModelBase
from .github.lister import GitHubLister
_lister = GitHubLister(api_baseurl='https://api.github.com',
override_config=override_conf)
elif lister == 'bitbucket':
from .bitbucket import models
from .bitbucket.models import IndexingModelBase as ModelBase
from .bitbucket.lister import BitBucketLister
_lister = BitBucketLister(api_baseurl='https://api.bitbucket.org/2.0',
override_config=override_conf)
elif lister == 'gitlab':
from .gitlab import models
from .gitlab.models import ModelBase
from .gitlab.lister import GitLabLister
_lister = GitLabLister(api_baseurl='https://gitlab.com/api/v4/',
override_config=override_conf)
......@@ -46,10 +46,10 @@ def cli(db_url, lister, create_tables, drop_tables):
raise ValueError('Only supported listers are %s' % supported_listers)
if drop_tables:
models.ModelBase.metadata.drop_all(_lister.db_engine)
ModelBase.metadata.drop_all(_lister.db_engine)
if create_tables:
models.ModelBase.metadata.create_all(_lister.db_engine)
ModelBase.metadata.create_all(_lister.db_engine)
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment