Ask Solem 12 年之前
父節點
當前提交
e78c768835
共有 3 個文件被更改,包括 9 次插入3 次删除
  1. 1 0
      celery/beat.py
  2. 1 0
      celery/contrib/rdb.py
  3. 7 3
      celery/platforms.py

+ 1 - 0
celery/beat.py

@@ -7,6 +7,7 @@
 
 """
 from __future__ import absolute_import
+from __future__ import with_statement
 
 import errno
 import os

+ 1 - 0
celery/contrib/rdb.py

@@ -35,6 +35,7 @@ Inspired by http://snippets.dzone.com/posts/show/7248
 
 """
 from __future__ import absolute_import
+from __future__ import with_statement
 
 import errno
 import os

+ 7 - 3
celery/platforms.py

@@ -626,9 +626,13 @@ else:
             '%s:%s' % (progname, current_process().name), info=info)
 
 
-def shellsplit(s, posix=True):
-    """Compat. version of :func:`shutil.shellsplit` that supports
-    the ``posix`` option which was first added in Python 2.6."""
+def shellsplit(s):
+    """Compat. version of :func:`shlex.split` that supports
+    the ``posix`` option which was first added in Python 2.6.
+
+    Posix behavior will be disabled if running under Windows.
+
+    """
     lexer = shlex.shlex(s, posix=not IS_WINDOWS)
     lexer.whitespace_split = True
     lexer.commenters = ''