소스 검색

celeryd-multi: Support empty suffix (--suffix='')

Ask Solem 13 년 전
부모
커밋
50dcc1b1a8
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      celery/bin/celeryd_multi.py

+ 4 - 1
celery/bin/celeryd_multi.py

@@ -348,7 +348,8 @@ class MultiTool(object):
         self.note(c.cyan("celeryd-multi v%s" % __version__))
 
     def waitexec(self, argv, path=sys.executable):
-        argstr = shlex.split(" ".join([path] + list(argv)))
+        args = " ".join([path] + list(argv))
+        argstr = shlex.split(args.encode("utf-8"))
         pipe = Popen(argstr)
         self.info("  %s" % " ".join(argstr))
         retcode = pipe.wait()
@@ -394,6 +395,8 @@ def multi_args(p, cmd="celeryd", append="", prefix="", suffix=""):
                    options.pop("-n", socket.gethostname()))
     prefix = options.pop("--prefix", prefix) or ""
     suffix = options.pop("--suffix", suffix) or "." + hostname
+    if suffix in ('""', "''"):
+        suffix = ""
 
     for ns_name, ns_opts in p.namespaces.items():
         if "," in ns_name or (ranges and "-" in ns_name):