extras-buildsys/client client.py,1.31,1.31.2.1

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Wed Oct 19 11:51:12 UTC 2005


Author: dcbw

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

Modified Files:
      Tag: STABLE_0_4
	client.py 
Log Message:
2005-10-19  Dan Williams  <dcbw at redhat.com>

    * client/client.py
        - Don't traceback when the 'allow_uploads' config options
            is not present
        - Correctly print target in job detail command without a
            traceback




Index: client.py
===================================================================
RCS file: /cvs/fedora/extras-buildsys/client/client.py,v
retrieving revision 1.31
retrieving revision 1.31.2.1
diff -u -r1.31 -r1.31.2.1
--- client.py	1 Sep 2005 20:36:12 -0000	1.31
+++ client.py	19 Oct 2005 11:51:10 -0000	1.31.2.1
@@ -194,7 +194,14 @@
     def _enqueue(self, is_srpm, package, source, target_alias):
         """ Enqueue a package on the server """
 
-        if self._cfg.get_bool("Server", "allow_uploads"):
+        try:
+            allow_up = self._cfg.get_bool("Server", "allow_uploads")
+        except BaseConfig.ConfigError, e:
+            pass
+        else:
+            allow_up = False
+    
+        if allow_up:
             import urllib
             addr = self._cfg.get_str("Server", "address")
             if addr.startswith("http") or addr.startswith("https"):
@@ -290,7 +297,8 @@
         print "\nDetail for Job ID %d (%s):" % (int(jobrec['uid']), jobrec['package'])
         print "-" * 80
         print "Source: %s" % jobrec['source']
-        print "Target: %s" % jobrec['target']
+        target_string = "%s-%s-%s" % (jobrec['target_distro'], jobrec['target_target'], jobrec['target_repo'])
+        print "Target: %s" % target_string
         print "Submitter: %s" % jobrec['username']
         try:
             result = jobrec['result']




More information about the fedora-extras-commits mailing list