Ask Solem 9 سال پیش
والد
کامیت
0196f0682b
2فایلهای تغییر یافته به همراه4 افزوده شده و 3 حذف شده
  1. 3 3
      celery/platforms.py
  2. 1 0
      celery/tests/utils/test_platforms.py

+ 3 - 3
celery/platforms.py

@@ -248,9 +248,9 @@ def _create_pidlock(pidfile):
     pidlock.acquire()
     pidlock.acquire()
     return pidlock
     return pidlock
 
 
+
 def fd_by_path(paths):
 def fd_by_path(paths):
-    """
-    Return a list of fds.
+    """Return a list of fds.
 
 
     This method returns list of fds corresponding to
     This method returns list of fds corresponding to
     file paths passed in paths variable.
     file paths passed in paths variable.
@@ -283,7 +283,7 @@ def fd_by_path(paths):
         except OSError:
         except OSError:
             return False
             return False
 
 
-    return [fd for fd in range(get_fdmax(2048)) if fd_in_stats(fd)]
+    return [_fd for _fd in range(get_fdmax(2048)) if fd_in_stats(_fd)]
 
 
 
 
 class DaemonContext(object):
 class DaemonContext(object):

+ 1 - 0
celery/tests/utils/test_platforms.py

@@ -56,6 +56,7 @@ class test_find_option_with_arg(Case):
             'bar'
             'bar'
         )
         )
 
 
+
 class test_fd_by_path(Case):
 class test_fd_by_path(Case):
 
 
     def test_finds(self):
     def test_finds(self):