[Rpm-metadata] 2 commits - createrepo/__init__.py worker.py
skvidal at osuosl.org
skvidal at osuosl.org
Thu Jan 27 19:03:56 UTC 2011
createrepo/__init__.py | 7 ++++++-
worker.py | 6 ++++--
2 files changed, 10 insertions(+), 3 deletions(-)
New commits:
commit 5c628c67fb20e7641a810f32c412b7e76ec0a0f0
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Jan 27 14:03:02 2011 -0500
if any of our workers exit with a non-zero returncode - die
diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 8f2538e..07abc27 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -660,7 +660,12 @@ class MetaDataGenerator:
if line:
self.callback.errorlog('Worker %s: %s' % (num, line.rstrip()))
-
+ for (num, job) in worker_jobs.items():
+ if job.returncode != 0:
+ msg = "Worker exited with non-zero value: %s. Fatal." % job.returncode
+ self.callback.errorlog(msg)
+ raise MDError, msg
+
if not self.conf.quiet:
self.callback.log("Workers Finished")
# finished with workers
commit 4f5e572f7241cbf7e32c771a4e113130634cde27
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Jan 27 14:02:45 2011 -0500
make sure the changelog_limit is an int (or None) and not something else
diff --git a/worker.py b/worker.py
index eb35ef7..591a922 100755
--- a/worker.py
+++ b/worker.py
@@ -83,8 +83,10 @@ def main(args):
external_data=external_data)
pri.write(pkg.xml_dump_primary_metadata())
fl.write(pkg.xml_dump_filelists_metadata())
- other.write(pkg.xml_dump_other_metadata(clog_limit=
- globalopts.get('clog_limit', None)))
+ clog_limit=globalopts.get('clog_limit', None)
+ if clog_limit is not None:
+ clog_limit = int(clog_limit)
+ other.write(pkg.xml_dump_other_metadata(clog_limit=clog_limit))
except yum.Errors.YumBaseError, e:
print >> sys.stderr, "Error: %s" % e
continue
More information about the Rpm-metadata
mailing list