[yum-commits] yum-cron/yum-cron.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Wed Jan 15 08:22:35 UTC 2014
yum-cron/yum-cron.py | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
New commits:
commit 13f69f68876fade7611bcbab6f612937e1c02bff
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date: Wed Jan 15 09:11:30 2014 +0100
yum-cron: emitUpdateFailed() expects str, not an array.
Avoid Python noise in the report. Also, use implicit conversion
instead of str() for unicode interoperability.
diff --git a/yum-cron/yum-cron.py b/yum-cron/yum-cron.py
index 87b3e69..6cbed94 100755
--- a/yum-cron/yum-cron.py
+++ b/yum-cron/yum-cron.py
@@ -545,7 +545,7 @@ class YumCronBase(yum.YumBase, YumOutput):
try:
self.getKeyForPackage(po)
except yum.Errors.YumBaseError, errmsg:
- self.emitUpdateFailed([str(errmsg)])
+ self.emitUpdateFailed(errmsg)
return False
else:
self.emitUpdateFailed(err)
@@ -563,8 +563,7 @@ class YumCronBase(yum.YumBase, YumOutput):
try:
self.runTransaction(cb=cb)
except yum.Errors.YumBaseError, err:
-
- self.emitUpdateFailed([str(err)])
+ self.emitUpdateFailed(err)
sys.exit(1)
if emit :
@@ -675,9 +674,9 @@ class YumCronBase(yum.YumBase, YumOutput):
"""Emit a notice stating that downloading the updates failed."""
map(lambda x: x.downloadFailed(error), self.emitters)
- def emitUpdateFailed(self, errmsgs):
+ def emitUpdateFailed(self, errmsg):
"""Emit a notice stating that automatic updates failed."""
- map(lambda x: x.updatesFailed(errmsgs), self.emitters)
+ map(lambda x: x.updatesFailed(errmsg), self.emitters)
def emitMessages(self):
"""Emit the messages from the emitters."""
More information about the Yum-commits
mailing list