diff options
author | Olav Vitters <olav@vitters.nl> | 2014-07-06 17:52:24 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2014-07-06 17:52:24 +0200 |
commit | 902966ce25302c39fb7c6a8e2d1376f88fc6ca9d (patch) | |
tree | f8295d736e0fc7cd2bcaaecaaef27d8a76b9defd | |
parent | 600f03f37a4b299bfd8f366edbbdcbe8fbcb9255 (diff) | |
download | mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.tar mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.tar.gz mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.tar.bz2 mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.tar.xz mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.zip |
retry submission if it fails
-rwxr-xr-x | mgagnome | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -979,6 +979,16 @@ class Downstream(object): cmd.append(package) return subprocess.check_call(cmd, cwd=cwd) + @classmethod + @retry(subprocess.CalledProcessError) + def ci(cls, package, changes, cwd=None): + if cwd is None: + cwd = os.path.expanduser(cls.PKGROOT) + + cmd = ['mgarepo', 'ci', '-m', changes] + return subprocess.check_call(cmd, cwd=cwd) + + def get_downstream_from_upstream(self, upstream, version): if upstream not in self.tarballs: raise ValueError("No packages for upstream name: %s" % upstream) @@ -1307,7 +1317,7 @@ def cmd_clean_spec_multi(args): # If we made it this far, checkin the changes if made_changes: if options.doit: - subprocess.check_call(['mgarepo', 'ci', '-m', s.changes], cwd=cwd) + Downstream.ci(package, s.changes, cwd=cwd) else: # show the diff and undo all changes print s.changes @@ -1376,7 +1386,7 @@ def cmd_package_new_version(options, parser): try: # If we made it this far, checkin the changes - subprocess.check_call(['mgarepo', 'ci', '-m', s.changes], cwd=cwd) + Downstream.ci(package, s.changes, cwd=cwd) # Submit is optional if options.submit: |