Author: Matti Picus <matti.pi...@gmail.com>
Branch: 
Changeset: r71053:430c42d4c761
Date: 2014-04-28 23:28 +0300
http://bitbucket.org/pypy/pypy/changeset/430c42d4c761/

Log:    fix for windows, script still does not create proper commands

diff --git a/pypy/tool/release/force-builds.py 
b/pypy/tool/release/force-builds.py
--- a/pypy/tool/release/force-builds.py
+++ b/pypy/tool/release/force-builds.py
@@ -9,7 +9,7 @@
 modified by PyPy team
 """
 
-import os, sys, pwd, urllib
+import os, sys, urllib
 
 from twisted.internet import reactor, defer
 from twisted.python import log
@@ -34,6 +34,13 @@
     'build-pypy-c-jit-linux-armel',
 ]
 
+def get_user():
+    if sys.platform == 'win32':
+        return os.environ['USERNAME']
+    else:
+        import pwd
+        return pwd.getpwuid(os.getuid())[0]
+
 def main():
     #XXX: handle release tags
     #XXX: handle validity checks
@@ -49,7 +56,7 @@
         print 'Forcing', builder, '...'
         url = "http://buildbot.pypy.org/builders/"; + builder + "/force"
         args = [
-            ('username', pwd.getpwuid(os.getuid())[0]),
+            ('username', get_user()),
             ('revision', ''),
             ('submit', 'Force Build'),
             ('branch', branch),
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to