Explorar el Código

Workaround to make the XMLRPC client usable on Windows. Closes #234

Lukas Rist hace 12 años
padre
commit
0ecbc86e44
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      supervisor/http.py

+ 5 - 1
supervisor/http.py

@@ -4,10 +4,14 @@ import time
 import sys
 import socket
 import errno
-import pwd
 import weakref
 import traceback
 
+try:
+    import pwd
+except ImportError:  # Windows
+    import getpass as pwd
+
 from supervisor.compat import urllib
 from supervisor.compat import sha1
 from supervisor.compat import as_bytes