# HG changeset patch # User Thomas De Schampheleire <thomas.de_schamphele...@nokia.com> # Date 1542919912 -3600 # Thu Nov 22 21:51:52 2018 +0100 # Node ID c33600f1151b81dcafda40e3003d4899c9c4189a # Parent a6b24ff6d65c33b84d4a6315013fb800816b47ee cli: fix celery-run
The conversion of celery_args (a tuple) into a list is mandatory, otherwise following error happens on celery-run: Traceback (most recent call last): File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/bin/kallithea-cli", line 11, in <module> load_entry_point('Kallithea', 'console_scripts', 'kallithea-cli')() File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/home/tdescham/repo/contrib/kallithea/kallithea-release/kallithea/bin/kallithea_cli_base.py", line 52, in runtime_wrapper return annotated(*args, **kwargs) File "/home/tdescham/repo/contrib/kallithea/kallithea-release/kallithea/bin/kallithea_cli_celery.py", line 39, in celery_run return cmd.run_from_argv('kallithea celery worker', celery_args) File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/bin/worker.py", line 177, in run_from_argv *self.parse_options(prog_name, argv, command)) File "/home/tdescham/repo/contrib/kallithea/venv/kallithea-release/lib/python2.7/site-packages/celery/bin/base.py", line 412, in parse_options return self.parser.parse_args(arguments) File "/usr/lib64/python2.7/optparse.py", line 1404, in parse_args args = largs + rargs TypeError: can only concatenate list (not "tuple") to list diff --git a/kallithea/bin/kallithea_cli_celery.py b/kallithea/bin/kallithea_cli_celery.py --- a/kallithea/bin/kallithea_cli_celery.py +++ b/kallithea/bin/kallithea_cli_celery.py @@ -36,4 +36,4 @@ def celery_run(celery_args): from kallithea.lib import celerypylons cmd = celerypylons.worker.worker(celerypylons.app) - return cmd.run_from_argv('kallithea celery worker', celery_args) + return cmd.run_from_argv('kallithea celery worker', list(celery_args)) _______________________________________________ kallithea-general mailing list kallithea-general@sfconservancy.org https://lists.sfconservancy.org/mailman/listinfo/kallithea-general