[yum-commits] 3 commits - repoclosure.py yumdownloader.py

zpavlas at osuosl.org zpavlas at osuosl.org
Thu Apr 25 08:00:14 UTC 2013


 repoclosure.py   |    6 +++---
 yumdownloader.py |    6 +++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 90a0b713a00826c40f7fc4e2039b3c6b155771ac
Author: Petr Janda <pjanda at redhat.com>
Date:   Thu Apr 25 09:58:47 2013 +0200

    grep-like exit codes

diff --git a/repoclosure.py b/repoclosure.py
index e33aafa..f895f84 100755
--- a/repoclosure.py
+++ b/repoclosure.py
@@ -306,6 +306,4 @@ if __name__ == "__main__":
         main()
     except (yum.Errors.YumBaseError, ValueError), e:
         print >> sys.stderr, str(e)
-        sys.exit(1)
-        
-        
+        sys.exit(2)
commit 4233cdc035ac6bbf2ac419691f0ae24df70a230f
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Fri Apr 19 12:24:18 2013 +0200

    exit(1) on unresolved deps.  BZ 790963

diff --git a/repoclosure.py b/repoclosure.py
index e5aae1b..e33aafa 100755
--- a/repoclosure.py
+++ b/repoclosure.py
@@ -298,6 +298,8 @@ def main():
                 req = '%s %s' % (req, v)
             
             my.logger.info('     %s' % req)
+    if baddeps:
+        sys.exit(1)
 
 if __name__ == "__main__":
     try:
commit 46d3aed60ea5400b33af24f71aeb18d702571789
Author: Zdenek Pavlas <zpavlas at redhat.com>
Date:   Thu Apr 18 10:45:19 2013 +0200

    yumdownloader: add a toplevel OSError handler

diff --git a/yumdownloader.py b/yumdownloader.py
index 00abeef..4c5eefb 100755
--- a/yumdownloader.py
+++ b/yumdownloader.py
@@ -71,7 +71,11 @@ class YumDownloader(YumUtilBase):
                           
         # Add util commandline options to the yum-cli ones
         self.optparser = self.getOptionParser() 
-        self.main()
+        try:
+            self.main()
+        except (OSError, IOError), e:
+            self.logger.error(exception2msg(e))
+            sys.exit(1)
 
     def main(self):
         # Add command line option specific to yumdownloader


More information about the Yum-commits mailing list