tasks: normalize the url argument name of most lister

Since all the listing tasks accepts an url as first argument (whatever the
argument name is), it makes sense to use a simple common argument name for
this. I've chosen 'url' instead of api_baseurl/forge_url/url.

Also kill now useless `new_lister()` functions.
This commit is contained in:
David Douard 2019-09-04 11:19:16 +02:00
parent 631b8e7668
commit b810876ef8
19 changed files with 60 additions and 91 deletions

View file

@ -63,7 +63,7 @@ def get_lister(lister_name, db_url=None, **conf):
(lister_name, SUPPORTED_LISTERS))
if db_url:
conf['lister'] = {'cls': 'local', 'args': {'db': db_url}}
# To allow api_baseurl override per lister
registry_entry = LISTERS[lister_name].load()()
lister_cls = registry_entry['lister']
lister = lister_cls(override_config=conf)