Mailinglist Archive: opensuse-buildservice (209 mails)

< Previous Next >
Re: [opensuse-buildservice] Little Bug in osc
  • From: Marcus Hüwe <suse-tux@xxxxxx>
  • Date: Thu, 21 Jun 2007 22:53:07 +0200
  • Message-id: <20070621205307.GF4364@xxxxxxxxxxxxxxxxxxx>
Hi,

On 2007-06-21 22:38:58 +0200, Jan-Simon Möller wrote:
> Hi!
> 
> osc createpac home:dl9pf:hamradio xdx
> Sending meta data...
> Done.
> Try again? (yY = Yes - nN = No):
> 
> ^^^^^^ try again although its already "Done"

The sync() method in core.py doesn't return anything if the
upload was successful. I attached a small patch.


Marcus
--- osc/core.py.old     2007-06-21 22:49:59.000000000 +0200
+++ osc/core.py 2007-06-21 22:50:25.000000000 +0200
@@ -849,14 +849,14 @@
         if self.change_is_required == True and os.path.getmtime(self.filename) == self.timestamp:
             print 'File unchanged. Not saving.'
             os.unlink(self.filename)
-            return
+            return True
 
         try:
             print 'Sending meta data...'
             http_PUT(self.url, file=self.filename)
             os.unlink(self.filename)
             print 'Done.'
-            return
+            return True
         except urllib2.HTTPError, e:
             # internal server error (probably the xml file is incorrect)
             if e.code == 500:
< Previous Next >
Follow Ups
References