--- a/cwconfig.py Mon Aug 23 09:07:20 2010 +0200
+++ b/cwconfig.py Mon Aug 23 12:49:28 2010 +0200
@@ -999,7 +999,7 @@
"""check given directory path exists, belongs to the user running the
server process and is writeable.
- If not, try to fix this, leting exception propagate when not possible.
+ If not, try to fix this, letting exception propagate when not possible.
"""
if not exists(path):
os.makedirs(path)
@@ -1010,7 +1010,10 @@
from pwd import getpwnam
uid = getpwnam(self['uid']).pw_uid
else:
- uid = os.getuid()
+ try:
+ uid = os.getuid()
+ except AttributeError: # we are on windows
+ return
fstat = os.stat(path)
if fstat.st_uid != uid:
os.chown(path, uid, os.getgid())