[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

extras-buildsys/server client_manager.py,1.13,1.14



Author: dcbw

Update of /cvs/fedora/extras-buildsys/server
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21068/server

Modified Files:
	client_manager.py 
Log Message:
Since the BuildClient traps job.valid() == False and returns None, we don't need the BuildClientManager to do so.


Index: client_manager.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/client_manager.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- client_manager.py	19 Jun 2005 02:47:53 -0000	1.13
+++ client_manager.py	19 Jun 2005 03:39:37 -0000	1.14
@@ -221,16 +221,16 @@
     
     def start_arch_job(self, parent_job, target, arch, srpm_url):
         # Can be called from other threads (notably from BuildJob threads)
-        job = None
         if arch in self._arches and self.available():
             job = BuildClientJob(self, parent_job, self._server, target, arch, srpm_url)
             if job.valid():
                 self._jobs.append(job)
                 self._update_cur_job()
+                return job
             else:
                 del job
-                job = None
-        return job
+
+        return None
 
     def _update_cur_job(self):
         # Need to do some locking here since BuildJobs (which are their own thread)
@@ -365,11 +365,7 @@
                 continue
             client_arches = client.arches()
             if arch in client_arches:
-                job = client.start_arch_job(parent_job, target, arch, srpm_url)
-                if not job.valid():
-                    del job
-                else:
-                    return job
+                return client.start_arch_job(parent_job, target, arch, srpm_url)
 
         return None
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]