Sfoglia il codice sorgente

Root warning should use getuid not geteuid

Ask Solem 13 anni fa
parent
commit
53514b158b
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      celery/apps/worker.py

+ 2 - 2
celery/apps/worker.py

@@ -130,9 +130,9 @@ class Worker(object):
         self.worker_init()
         self.redirect_stdouts_to_logger()
 
-        if getattr(os, "geteuid", None) and os.geteuid() == 0:
+        if getattr(os, "getuid", None) and os.getuid() == 0:
             warnings.warn(
-                "Running celeryd with superuser privileges is not encouraged!")
+                "Running celeryd with superuser privileges is discouraged!")
 
         if self.discard:
             self.purge_messages()