cli: Fix swh-scheduler command
Add a simple fix for currently broken swh-scheduler command (see stacktrace below).
The command should be removed soon but while it is still here, it should work.
Executing test script test_01_loader_git.sh
Scheduling the loading of the git repository located at https://forge.softwareheritage.org/source/swh-loader-tar.git[test_01_loader_git.sh]
Traceback (most recent call last):
File "/srv/softwareheritage/venv/bin/swh-scheduler", line 10, in <module>
sys.exit(main())
File "/srv/softwareheritage/venv/lib/python3.6/site-packages/swh/scheduler/cli/__init__.py", line 72, in main
return cli(auto_envvar_prefix='SWH_SCHEDULER')
File "/srv/softwareheritage/venv/lib/python3.6/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/srv/softwareheritage/venv/lib/python3.6/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/srv/softwareheritage/venv/lib/python3.6/site-packages/click/core.py", line 1134, in invoke
Command.invoke(self, ctx)
File "/srv/softwareheritage/venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/srv/softwareheritage/venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/srv/softwareheritage/venv/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/srv/softwareheritage/venv/lib/python3.6/site-packages/swh/scheduler/cli/__init__.py", line 36, in cli
loglevel=ctx.obj['log_level'], colorize=False,
TypeError: 'NoneType' object is not subscriptable
An error occurred when running test script test_01_loader_git.sh
Depends on swh-core!59 (closed)
Migrated from D1464 (view on Phabricator)