[yum-commits] plugins/rpm-warm-cache
James Antill
james at osuosl.org
Fri Nov 21 15:19:52 UTC 2008
plugins/rpm-warm-cache/rpm-warm-cache.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit 854d581f55cfe625f2631efb97a43161b9e30a62
Author: Ralf Ertzinger <ralf at camperquake.de>
Date: Fri Nov 21 10:19:41 2008 -0500
Fix rpm warm cache plugin when no commands are there
diff --git a/plugins/rpm-warm-cache/rpm-warm-cache.py b/plugins/rpm-warm-cache/rpm-warm-cache.py
index b80c0f6..3f5ba4f 100644
--- a/plugins/rpm-warm-cache/rpm-warm-cache.py
+++ b/plugins/rpm-warm-cache/rpm-warm-cache.py
@@ -28,7 +28,12 @@ plugin_type = (TYPE_CORE,)
def postreposetup_hook(conduit):
opts, commands = conduit.getCmdLine()
- if commands[0] in ('upgrade', 'install', 'remove'):
+ try:
+ cmd = commands[0]
+ except IndexError:
+ # No command given, don't do anything
+ return
+ if cmd in ('upgrade', 'install', 'remove'):
try:
for root, dirs, files in walk('/var/lib/rpm'):
for file in files:
More information about the Yum-commits
mailing list