[yum-commits] Branch 'yum-3_2_X' - 2 commits - shell.py yum/metalink.py

James Antill james at osuosl.org
Thu Nov 13 19:23:25 UTC 2008


 shell.py        |    4 ++--
 yum/metalink.py |    5 ++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 2c3734e99ada52826eb4dacb385f810ff41c501c
Author: James Antill <james at and.org>
Date:   Thu Nov 13 14:16:54 2008 -0500

    Catch XML parse exceptions and convert to MetaLinkRepoErrorParseFail

diff --git a/yum/metalink.py b/yum/metalink.py
index 5a57511..c478e0e 100755
--- a/yum/metalink.py
+++ b/yum/metalink.py
@@ -179,7 +179,10 @@ class MetaLinkRepoMD:
         self.mirrors = []
         if not os.path.exists(filename):
             raise MetaLinkRepoErrorParseFail, "File %s does not exist" %filename
-        root = xmlparse(filename)
+        try:
+            root = xmlparse(filename)
+        except SyntaxError:
+            raise MetaLinkRepoErrorParseFail, "File %s is not XML" % filename
 
         for elem in root.findall(__ML_FILE_ELEMENT__):
             name = elem.get('name')
commit b17d14c90c51223ec83026173cb8784e8950b596
Author: James Antill <james at and.org>
Date:   Wed Nov 12 11:34:38 2008 -0500

    Explain "repo list" better in shell command help

diff --git a/shell.py b/shell.py
index 145e344..97bd963 100644
--- a/shell.py
+++ b/shell.py
@@ -114,7 +114,7 @@ class YumShell(cmd.Cmd):
         msg = """
     Shell specific arguments:
       config - set config options
-      repository (or repo) - enable/disable repositories
+      repository (or repo) - enable/disable/list repositories
       transaction (or ts) - list, reset or run the transaction set
       run - run the transaction set
       exit or quit - exit the shell
@@ -131,7 +131,7 @@ class YumShell(cmd.Cmd):
         elif arg in ['repo', 'repository']:
             msg = """
     %s arg [option]
-      list: lists repositories and their status
+      list: lists repositories and their status. option = [all] name/id glob
       enable: enable repositories. option = repository id
       disable: disable repositories. option = repository id
     """ % arg


More information about the Yum-commits mailing list