]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
pygrub: More accurate try/except catch.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 31 Mar 2009 10:17:51 +0000 (11:17 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 31 Mar 2009 10:17:51 +0000 (11:17 +0100)
Signed-off-by: Michal Novotny <minovotn@redhat.com>
tools/pygrub/src/pygrub

index ba70832e62e01716d7049a91882bd5e9fe9571fa..561bc7efe928561d582dec596a666cedab59f6e7 100644 (file)
@@ -532,7 +532,7 @@ def run_grub(file, entry, fs, arg):
 
     try:
         img = g.cf.images[sel]
-    except:
+    except IndexError:
         log.debug("PyGrub: Default selection is not valid, using first boot configuration...")
         img = g.cf.images[0]