[Yum-devel] [PATCH] completion_helper: catch GroupsError. BZ 806844.

Zdeněk Pavlas zpavlas at redhat.com
Thu Apr 5 09:12:08 UTC 2012


---
 completion-helper.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/completion-helper.py b/completion-helper.py
index 2e95ced..405ceab 100755
--- a/completion-helper.py
+++ b/completion-helper.py
@@ -23,6 +23,7 @@ import sys
 
 import cli
 import yumcommands
+from yum.Errors import GroupsError
 
 
 class GroupsCompletionCommand(yumcommands.GroupsCommand):
@@ -76,7 +77,10 @@ def main(args):
     base.parseCommands()
     for repo in base.repos.listEnabled():
         repo.skip_if_unavailable = True
-    base.doCommands()
+    try:
+        base.doCommands()
+    except GroupsError, e:
+        base.logger.error(e)
 
 if __name__ == "__main__":
     try:
-- 
1.7.4.4



More information about the Yum-devel mailing list