Skip to contentSkip to conversation

pygrub: fix attribute error when not found parser

PATCH New Wei Kong 1 participant 1 message Dec 15, 2009

lore
Share & tools
lore

Wei Kong

author
#0 lore raw

PATCH 1/1 pygrub: fix attribute error when not found parser

--

tools/pygrub/src/pygrub 2009-12-15 03:17:41.000000000 +0800 renamed from tools/pygrub/src/pygrub 2009-12-15 03:18:10.000000000 +0800 +1 -1
@@ -398,7 +398,7 @@ class Grub:
                 self.cf = parser()
                 self.cf.filename = f
                 break
-        if self.cf.filename is None:
+        if self.__dict__.get('cf', None) is None:
             raise RuntimeError, "couldn't find bootloader config file in

the image provided."
f = fs.open_file(self.cf.filename)
buf = f.read()

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel