浏览代码

Windows: geteuid not available. Closes #1676

Ask Solem 11 年之前
父节点
当前提交
4ce322d138
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      celery/platforms.py

+ 2 - 0
celery/platforms.py

@@ -493,6 +493,8 @@ def maybe_drop_privileges(uid=None, gid=None):
     If only GID is specified, only the group is changed.
     If only GID is specified, only the group is changed.
 
 
     """
     """
+    if sys.platform == 'win32':
+        return
     if os.geteuid():
     if os.geteuid():
         # no point trying to setuid unless we're root.
         # no point trying to setuid unless we're root.
         if not os.getuid():
         if not os.getuid():