[yum-commits] plugins/rpm-warm-cache

James Antill james at osuosl.org
Mon Apr 6 13:50:03 UTC 2009


 plugins/rpm-warm-cache/rpm-warm-cache.py |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0ed7bc9fe6aec6d7978e295506968809580dfe3d
Author: James Antill <james at and.org>
Date:   Mon Apr 6 09:49:51 2009 -0400

    Really fix the exception in rpm-warm-cache

diff --git a/plugins/rpm-warm-cache/rpm-warm-cache.py b/plugins/rpm-warm-cache/rpm-warm-cache.py
index edabb5a..176069d 100644
--- a/plugins/rpm-warm-cache/rpm-warm-cache.py
+++ b/plugins/rpm-warm-cache/rpm-warm-cache.py
@@ -28,9 +28,9 @@ plugin_type = (TYPE_CORE,)
 
 def postreposetup_hook(conduit):
     opts, commands = conduit.getCmdLine()
-    try:
+    if commands is not None:
         cmd = commands[0]
-    except IndexError:
+    else:
         # No command given, do it as it's cheap enough
         cmd = 'install'
     if (cmd in ('upgrade', 'install', 'remove', 'search') or


More information about the Yum-commits mailing list