[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] pygrub: fix attribute error when not found parser


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Wei Kong <weikong.cn@xxxxxxxxx>
  • Date: Tue, 15 Dec 2009 18:28:48 +0800
  • Delivery-date: Tue, 15 Dec 2009 02:52:18 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=HR+RxVlX4TUVhjKpaFJ4vI93XMOdGQwMdY6b4yNmHGRdZqv5//xl+r8X4BayEc3Ki2 2kAcEFpfg5wLxRfrLdEA4WvDFWc5Z2Ze2Axaw9iPRgLGcyHddA70LNlS7RT45TW1U9gs 92kopZupsfNuR0voIx1yvKscxoHooOK3AcClE=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.