Browse Source

Fix get_fdmax on Windows

Ask Solem 11 years ago
parent
commit
2de5a2357d
1 changed files with 2 additions and 0 deletions
  1. 2 0
      celery/platforms.py

+ 2 - 0
celery/platforms.py

@@ -87,6 +87,8 @@ def get_fdmax(default=None):
                       descriptor limit.
 
     """
+    if resource is None:  # Windows
+        return default
     fdmax = resource.getrlimit(resource.RLIMIT_NOFILE)[1]
     if fdmax == resource.RLIM_INFINITY:
         return default