Browse Source

Forgot to save merge

Ask Solem 12 years ago
parent
commit
7038ad7f7c
1 changed files with 5 additions and 2 deletions
  1. 5 2
      celery/app/utils.py

+ 5 - 2
celery/app/utils.py

@@ -12,7 +12,10 @@ import os
 import platform as _platform
 import types
 
-from billiard import forking as _forking
+try:
+    from billiard import forking as _forking
+except ImportError:  # noqa
+    _forking = None
 
 from celery import platforms
 from celery.five import items
@@ -73,7 +76,7 @@ class Settings(ConfigurationView):
         # is enabled.  There may be a better way to do this, but attempts
         # at forcing the subprocess to import the modules did not work out,
         # because of some sys.path problem.  More at Issue #1126.
-        if _forking._forking_is_enabled:
+        if _forking and _forking._forking_is_enabled:
             return self.changes
         R = {}
         for d in reversed(self._order[:-1]):