Prechádzať zdrojové kódy

WatchedFileHandler: Fixes Python <= 2.5 compat. Closes #367.

adriano petrich 14 rokov pred
rodič
commit
ae9d08146b
1 zmenil súbory, kde vykonal 3 pridanie a 3 odobranie
  1. 3 3
      celery/utils/compat.py

+ 3 - 3
celery/utils/compat.py

@@ -515,9 +515,9 @@ else:
             This handler is based on a suggestion and patch by Chad J.
             Schroeder.
             """
-            def __init__(self, filename, mode='a', encoding=None, delay=0):
-                logging.FileHandler.__init__(self, filename, mode,
-                                             encoding, delay)
+            def __init__(self, *args, **kwargs):
+                logging.FileHandler.__init__(self, *args, **kwargs)
+
                 if not os.path.exists(self.baseFilename):
                     self.dev, self.ino = -1, -1
                 else: