pygrub: fix attribute error when not found parser

Signed-off-by: Wei Kong <weikong.cn@gmail.com>
This commit is contained in:
Keir Fraser committed 2009-12-16 12:20:57 +00:00
1 parent 3cc29c0f26
commit 7cafc0777f
1 file changed
+1 -1
+1 -1
View File
@@ -397,7 +397,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()
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.