Skip to content

Commit 5d1ecb0

Browse files
dapaojiangauvipy
authored andcommitted
Update celery.py (#561)
* Update celery.py fix TypeError: can only concatenate tuple (not "NoneType") to tuple #560 * Update celery.py fix fix CeleryCommand has no attribute preload_options * Update setup.py update package name * Update setup.py fix package name mistake
1 parent 830597a commit 5d1ecb0

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

djcelery/management/commands/celery.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@
1111
class Command(CeleryCommand):
1212
"""The celery command."""
1313
help = 'celery commands, see celery help'
14-
options = (CeleryCommand.options +
15-
base.get_options() +
16-
base.preload_options)
14+
cc_options = CeleryCommand.options if CeleryCommand.options else []
15+
base_options = base.get_options() if base.get_options() else []
16+
if hasattr(base, "preload_options"):
17+
preload_options = base.preload_options if base.preload_options else []
18+
else:
19+
preload_options = []
20+
preload_options = base.preload_options if base.preload_options else []
21+
options = (cc_options +
22+
base_options +
23+
preload_options)
1724

1825
def run_from_argv(self, argv):
1926
argv = self.handle_default_options(argv)

0 commit comments

Comments
 (0)