Skip to content

Commit

Permalink
Update celery.py (#561)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
dapaojiang authored and auvipy committed Apr 24, 2019
1 parent 830597a commit 5d1ecb0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions djcelery/management/commands/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@
class Command(CeleryCommand):
"""The celery command."""
help = 'celery commands, see celery help'
options = (CeleryCommand.options +
base.get_options() +
base.preload_options)
cc_options = CeleryCommand.options if CeleryCommand.options else []
base_options = base.get_options() if base.get_options() else []
if hasattr(base, "preload_options"):
preload_options = base.preload_options if base.preload_options else []
else:
preload_options = []
preload_options = base.preload_options if base.preload_options else []
options = (cc_options +
base_options +
preload_options)

def run_from_argv(self, argv):
argv = self.handle_default_options(argv)
Expand Down

0 comments on commit 5d1ecb0

Please sign in to comment.