extras-buildsys/server Repo.py,1.14,1.15

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Wed Aug 31 15:58:54 UTC 2005


Author: dcbw

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

Modified Files:
	Repo.py 
Log Message:
Fix up self._target->target_str


Index: Repo.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/server/Repo.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Repo.py	25 Aug 2005 18:15:14 -0000	1.14
+++ Repo.py	31 Aug 2005 15:58:52 -0000	1.15
@@ -100,8 +100,9 @@
             print "Error: createrepo failed with exit status %d!  Output: '%s'" % (s, o)
 
     def _run_repo_script(self):
-        cmd = "%s %s" % (self._repo_script, self._target)
-        print "Repo '%s': executing repository script %s" % (self._target, self._repo_script)
+        target_str = self._target_cfg.target_string()
+        cmd = "%s %s" % (self._repo_script, target_str)
+        print "Repo '%s': executing repository script %s" % (target_str, self._repo_script)
         self._pobj = popen2.Popen4(cmd=cmd)
         fcntl.fcntl(self._pobj.fromchild.fileno(), fcntl.F_SETFL, os.O_NONBLOCK)
         self._repo_script_start = time.time()
@@ -127,13 +128,14 @@
         return output
 
     def _monitor_repo_script(self):
+        target_str = self._target_cfg.target_string()
         unlock = False
         exit_status = self._pobj.poll()
         if exit_status == 0:
-            print "Repo '%s': repo script %s done." % (self._target, self._repo_script)
+            print "Repo '%s': repo script %s done." % (target_str, self._repo_script)
             unlock = True
         elif exit_status > 0:
-            subj = "Repo '%s': repo script %s exited with error: %d." % (self._target, self._repo_script, exit_status)
+            subj = "Repo '%s': repo script %s exited with error: %d." % (target_str, self._repo_script, exit_status)
             self._email_repo_script_failure(subj)
             print subj
             unlock = True
@@ -144,7 +146,7 @@
                     os.kill(self._pobj.pid, 9)
                 except OSError:
                     pass
-                subj = "Repo '%s': repo script %s timed out and was killed." % (self._target, self._repo_script)
+                subj = "Repo '%s': repo script %s timed out and was killed." % (target_str, self._repo_script)
                 self._email_repo_script_failure(subj)
                 print subj
                 unlock = True
@@ -171,9 +173,10 @@
 
             # Level 2: update the repo
             if self._lock_count == 2:
-                print "Repo '%s': updating repository metadata..." % self._target
+                target_str = self._target_cfg.target_string()
+                print "Repo '%s': updating repository metadata..." % target_str
                 self._update_repo()
-                print "Repo '%s': Done updating." % self._target
+                print "Repo '%s': Done updating." % target_str
 
                 # If there's a repo script for this target, enter level 3
                 if self._repo_script:




More information about the scm-commits mailing list