Ask Solem 10 年之前
父节点
当前提交
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):