Wei Kong
2009-Dec-15 10:28 UTC
[Xen-devel] [PATCH] pygrub: fix attribute error when not found parser
Signed-off-by: Wei Kong <weikong.cn@gmail.com>
--
--- a/tools/pygrub/src/pygrub 2009-12-15 03:18:10.000000000 +0800
+++ b/tools/pygrub/src/pygrub 2009-12-15 03:17:41.000000000 +0800
@@ -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
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel