mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
pygrub: fix attribute error when not found parser
Signed-off-by: Wei Kong <weikong.cn@gmail.com>
This commit is contained in:
1 parent
3cc29c0f26
commit
7cafc0777f
1 file changed
+1
-1
@@ -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()
|
||||
|
||||