From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2] tools/pygrub: Make pygrub understand default entry in string format Date: Fri, 27 Jun 2014 12:58:01 +0100 Message-ID: <1403870281.25894.52.camel@kazak.uk.xensource.com> References: <1403811243-4867-1-git-send-email-boris.ostrovsky@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1403811243-4867-1-git-send-email-boris.ostrovsky@oracle.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Boris Ostrovsky Cc: xen-devel@lists.xen.org, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Thu, 2014-06-26 at 15:34 -0400, Boris Ostrovsky wrote: > if self.commands[com] is not None: > - if arg.strip() == "${saved_entry}": > + arg_strip = arg.strip() > + if arg_strip() == "${saved_entry}" or arg_strip == "${next_entry}": Is arg_strip (being the result of arg.strip()) really a callable object here? > diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub > index a4a2423..f46e54f 100644 > --- a/tools/pygrub/src/pygrub > +++ b/tools/pygrub/src/pygrub > + # We don't fully support submenus. Look for the leaf value in > + # "submenu0>submenu1>...>menuentry" and hope that it's unique. > + title = self.cf.default > + while (1): I'm not much of a Python-head, but "while True:" surely? Ian.