changeset 5466:9b85f7601772

fix moin calling non-existing os.getuid on win32
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Wed, 20 Jan 2010 16:04:29 +0100
parents 3e6b8234861c
children db8b17d3a967
files MoinMoin/web/serving.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/web/serving.py	Tue Jan 19 23:59:37 2010 +0100
+++ b/MoinMoin/web/serving.py	Wed Jan 20 16:04:29 2010 +0100
@@ -137,9 +137,10 @@
     """ Run a standalone server on specified host/port. """
     application = make_application(shared=docs)
 
-    if port < 1024 and os.getuid() != 0:
-        raise RuntimeError('Must run as root to serve port number under 1024. '
-                           'Run as root or change port setting.')
+    if port < 1024:
+        if os.name == 'posix' and os.getuid() != 0:
+            raise RuntimeError('Must run as root to serve port number under 1024. '
+                               'Run as root or change port setting.')
 
     if user:
         switch_user(user, group)