소스 검색

Check for Windows _before_ importing os.kill(). fixes #450

Greg Haskins 13 년 전
부모
커밋
6143def9ae
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      celery/concurrency/processes/__init__.py

+ 2 - 2
celery/concurrency/processes/__init__.py

@@ -6,8 +6,6 @@ Process Pools.
 import platform
 import platform
 import signal as _signal
 import signal as _signal
 
 
-from os import kill as _kill
-
 from celery.concurrency.base import BasePool
 from celery.concurrency.base import BasePool
 from celery.concurrency.processes.pool import Pool, RUN
 from celery.concurrency.processes.pool import Pool, RUN
 
 
@@ -17,6 +15,8 @@ if platform.system() == "Windows":  # pragma: no cover
     # *and its children* (if any).
     # *and its children* (if any).
     from celery.concurrency.processes import _win
     from celery.concurrency.processes import _win
     _kill = _win.kill_processtree  # noqa
     _kill = _win.kill_processtree  # noqa
+else:
+    from os import kill as _kill
 
 
 
 
 class TaskPool(BasePool):
 class TaskPool(BasePool):