[yum-cvs] yumdownloader.py

Seth Vidal skvidal at linux.duke.edu
Wed Oct 17 04:56:55 UTC 2007


 yumdownloader.py |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 37150bb1391c83426aac2345592ef060627f592b
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Wed Oct 17 00:54:52 2007 -0400

    catches an error if someone has --enablerepo or --disablerepo set and tries to tell them what to do.

diff --git a/yumdownloader.py b/yumdownloader.py
index 039eecd..3c3faf2 100755
--- a/yumdownloader.py
+++ b/yumdownloader.py
@@ -46,7 +46,12 @@ class YumDownloader(YumUtilBase):
         # Add command line option specific to yumdownloader
         self.addCmdOptions(parser)
         # Parse the commandline option and setup the basics.
-        opts = self.doUtilConfigSetup()
+        try:
+            opts = self.doUtilConfigSetup()
+        except yum.Errors.RepoError, e:
+            self.logger.error("Cannot handle specific enablerepo/disablerepo options.")
+            sys.exit(50)
+                
         # Check if there is anything to do.
         if len(self.cmds) < 1: 
             parser.print_help()



More information about the Yum-cvs-commits mailing list