MCPcopy Create free account
hub / github.com/celery/celery / execute_from_commandline

Method execute_from_commandline

celery/bin/multi.py:262–271  ·  view source on GitHub ↗
(self, argv, cmd=None)

Source from the content-addressed store, hash-verified

260 }
261
262 def execute_from_commandline(self, argv, cmd=None):
263 # Reserve the --nosplash|--quiet|-q/--verbose options.
264 argv = self._handle_reserved_options(argv)
265 self.cmd = cmd if cmd is not None else self.cmd
266 self.prog_name = os.path.basename(argv.pop(0))
267
268 if not self.validate_arguments(argv):
269 return self.error()
270
271 return self.call_command(argv[0], argv[1:])
272
273 def validate_arguments(self, argv):
274 return argv and argv[0][0] != '-'

Callers 2

multiFunction · 0.95
mainFunction · 0.80

Calls 5

validate_argumentsMethod · 0.95
call_commandMethod · 0.95
popMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected