aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-12-16 12:20:57 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-12-16 12:20:57 +0000
commit7cafc0777f620a62827e0076dfa32be49603f4da (patch)
treeccf2de8f78436ad7a8ae3023e346f0e08d3e9b59 /tools/pygrub
parent3cc29c0f268789f120cd5bb5c15b3977bed2c414 (diff)
downloadxen-7cafc0777f620a62827e0076dfa32be49603f4da.tar.gz
xen-7cafc0777f620a62827e0076dfa32be49603f4da.tar.bz2
xen-7cafc0777f620a62827e0076dfa32be49603f4da.zip
pygrub: fix attribute error when not found parser
Signed-off-by: Wei Kong <weikong.cn@gmail.com>
Diffstat (limited to 'tools/pygrub')
-rw-r--r--tools/pygrub/src/pygrub2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index d77fee77d1..c2870853c2 100644
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -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()