Ver Fonte

f.fileno() may raise ValueError

Ask Solem há 11 anos atrás
pai
commit
e7238af4a8
1 ficheiros alterados com 2 adições e 9 exclusões
  1. 2 9
      celery/platforms.py

+ 2 - 9
celery/platforms.py

@@ -59,17 +59,10 @@ Seems we're already running? (pid: {1})"""
 
 
 try:
 try:
     from io import UnsupportedOperation
     from io import UnsupportedOperation
-    FILENO_ERRORS = (AttributeError, UnsupportedOperation)
+    FILENO_ERRORS = (AttributeError, ValueError, UnsupportedOperation)
 except ImportError:  # pragma: no cover
 except ImportError:  # pragma: no cover
     # Py2
     # Py2
-    FILENO_ERRORS = (AttributeError, )  # noqa
-
-try:
-    from io import UnsupportedOperation
-    FILENO_ERRORS = (AttributeError, UnsupportedOperation)
-except ImportError:  # pragma: no cover
-    # Py2
-    FILENO_ERRORS = (AttributeError, )  # noqa
+    FILENO_ERRORS = (AttributeError, ValueError)  # noqa
 
 
 
 
 def pyimplementation():
 def pyimplementation():