[pypy-svn] r33363 - pypy/dist/pypy/tool/build

guido at codespeak.net guido at codespeak.net
Tue Oct 17 13:32:00 CEST 2006


Author: guido
Date: Tue Oct 17 13:31:58 2006
New Revision: 33363

Modified:
   pypy/dist/pypy/tool/build/config.py
   pypy/dist/pypy/tool/build/server.py
   pypy/dist/pypy/tool/build/systemoption.py
Log:
Removed stale import, some whitespace issues, moved a comment a bit and removed
a useless else statement.


Modified: pypy/dist/pypy/tool/build/config.py
==============================================================================
--- pypy/dist/pypy/tool/build/config.py	(original)
+++ pypy/dist/pypy/tool/build/config.py	Tue Oct 17 13:31:58 2006
@@ -8,7 +8,7 @@
 path = [str(packageparent)]
 
 # configuration of options for client and startcompile
-from pypy.config.config import Config, to_optparse
+from pypy.config.config import Config
 
 # system config, on the client everything is set by scanning the system, when
 # calling startcompile defaults are taken from the system, overrides are
@@ -29,5 +29,5 @@
 mailfrom = 'johnny at johnnydebris.net'
 
 # settings for the tests
-testpath = [str(py.magic.autopath().dirpath().dirpath())] 
+testpath = [str(py.magic.autopath().dirpath().dirpath())]
 

Modified: pypy/dist/pypy/tool/build/server.py
==============================================================================
--- pypy/dist/pypy/tool/build/server.py	(original)
+++ pypy/dist/pypy/tool/build/server.py	Tue Oct 17 13:31:58 2006
@@ -147,7 +147,7 @@
 class PPBServer(object):
     retry_interval = 10
     
-    def __init__(self, projname, channel, builddir, mailhost=None, 
+    def __init__(self, projname, channel, builddir, mailhost=None,
                     mailport=None, mailfrom=None):
         self._projname = projname
         self._channel = channel
@@ -196,24 +196,23 @@
             return (True, pathstr)
         for client in self._clients:
             if client.busy_on == info:
-                self._channel.send('build for %r currently in progress' % 
+                self._channel.send('build for %r currently in progress' %
                                     (info,))
                 return (False, 'this build is already in progress')
         # we don't have a build for this yet, find a client to compile it
         if self.run(info):
             return (False, 'found a suitable client, going to build')
-        else:
-            self._queuelock.acquire()
-            try:
-                self._queued.append(info)
-            finally:
-                self._queuelock.release()
-            return (False, 'no suitable client found; your request is queued')
+        self._queuelock.acquire()
+        try:
+            self._queued.append(info)
+        finally:
+            self._queuelock.release()
+        return (False, 'no suitable client found; your request is queued')
     
     def run(self, info):
         """find a suitable client and run the job if possible"""
-        # XXX shuffle should be replaced by something smarter obviously ;)
         clients = self._clients[:]
+        # XXX shuffle should be replaced by something smarter obviously ;)
         random.shuffle(clients)
         for client in clients:
             if client.busy_on or not issubdict(info[0], client.sysinfo):

Modified: pypy/dist/pypy/tool/build/systemoption.py
==============================================================================
--- pypy/dist/pypy/tool/build/systemoption.py	(original)
+++ pypy/dist/pypy/tool/build/systemoption.py	Tue Oct 17 13:31:58 2006
@@ -6,6 +6,6 @@
 system_optiondescription = OptionDescription('system', '', [
     ChoiceOption('maxint', 'maximum int value in bytes (32/64)', ['32', '64'],
                     sys.maxint, '-i --maxint'),
-    ChoiceOption('byteorder', 'endianness, byte order (little/big)', 
+    ChoiceOption('byteorder', 'endianness, byte order (little/big)',
                     sys.byteorder, ['little', 'big'], '-b --byteorder'),
 ])



More information about the Pypy-commit mailing list