debuggers.hg

changeset 20693:f9998fedea78

pygrub: fix attribute error when not found parser

Signed-off-by: Wei Kong <weikong.cn@gmail.com>
author Keir Fraser <keir.fraser@citrix.com>
date Wed Dec 16 12:20:57 2009 +0000 (2009-12-16)
parents d7403d17d03a
children 91ec06817632
files tools/pygrub/src/pygrub
line diff
     1.1 --- a/tools/pygrub/src/pygrub	Wed Dec 16 12:20:08 2009 +0000
     1.2 +++ b/tools/pygrub/src/pygrub	Wed Dec 16 12:20:57 2009 +0000
     1.3 @@ -397,7 +397,7 @@ class Grub:
     1.4                  self.cf = parser()
     1.5                  self.cf.filename = f
     1.6                  break
     1.7 -        if self.cf.filename is None:
     1.8 +        if self.__dict__.get('cf', None) is None:
     1.9              raise RuntimeError, "couldn't find bootloader config file in the image provided."
    1.10          f = fs.open_file(self.cf.filename)
    1.11          buf = f.read()