Parcourir la source

Root warning should use getuid not geteuid

Ask Solem il y a 13 ans
Parent
commit
f4c2fee7d0
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  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()