Blob Blame History Raw
diff --git a/completion-helper.py b/completion-helper.py
index 405ceab..71de058 100755
--- a/completion-helper.py
+++ b/completion-helper.py
@@ -69,6 +69,8 @@ def get_pattern(extcmds):
 
 def main(args):
     base = cli.YumBaseCli()
+    # We want the default cachedir but commit 0f034091 does not.
+    base.setCacheDir = lambda *x: True # monkeypatch
     base.yum_cli_commands.clear()
     base.registerCommand(GroupsCompletionCommand())
     base.registerCommand(ListCompletionCommand())
commit 6351d7bbb6957e7c739a674696fcc5d7d31ecb17
Author: Zdeněk Pavlas <zpavlas@redhat.com>
Date:   Wed Apr 4 13:36:36 2012 +0200

    completion-helper: skip unavailable repos.  BZ 809469.
    
    completion-helper uses --cacheonly option to avoid metadata
    download, so new (or cleaned up) repos raise exceptions.
    
    We work this around by setting skip_if_unavailable=1 on all
    enabled repositories.

diff --git a/completion-helper.py b/completion-helper.py
index e4164f7..2e95ced 100755
--- a/completion-helper.py
+++ b/completion-helper.py
@@ -74,6 +74,8 @@ def main(args):
     base.registerCommand(RepoListCompletionCommand())
     base.getOptionsConfig(args)
     base.parseCommands()
+    for repo in base.repos.listEnabled():
+        repo.skip_if_unavailable = True
     base.doCommands()
 
 if __name__ == "__main__":
commit 6d8a99b413698b117b787fb8d69abeba4fbe7826
Author: Zdeněk Pavlas <zpavlas@redhat.com>
Date:   Thu Apr 5 11:08:08 2012 +0200

    completion_helper: catch GroupsError.  BZ 806844.

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: