Skip to content

Commit b58fb54

Browse files
authored
Update celery.py
fix TypeError: can only concatenate tuple (not "NoneType") to tuple celery#560
1 parent 0a1e83d commit b58fb54

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

djcelery/management/commands/celery.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
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+
options = (cc_options +
21+
base_options +
22+
preload_options)
1723

1824
def run_from_argv(self, argv):
1925
argv = self.handle_default_options(argv)

0 commit comments

Comments
 (0)