From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] tools: xend: fix wrong condition check for xml file Date: Wed, 17 Oct 2012 14:27:36 -0400 Message-ID: <20121017182736.GA25845@phenom.dumpdata.com> References: <507CC8F4.4080103@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <507CC8F4.4080103@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: Joe Jin Cc: chuang cao , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On Tue, Oct 16, 2012 at 10:39:48AM +0800, Joe Jin wrote: > Hi Konrad, > > Would you please review below fix? Reviewed-by: Konrad Rzeszutek Wilk > > Thanks, > Joe > > > In commit e8d40584, it intended to check xml file size and when empty will > return, the condition should be "if os.path.getsize(xml_path) == 0" rather > then "if not os.path.getsize(xml_path) == 0". > > Signed-off-by: Chuang Cao > Signed-off-by: Joe Jin > --- > tools/python/xen/xend/XendStateStore.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/python/xen/xend/XendStateStore.py b/tools/python/xen/xend/XendStateStore.py > index 17a29f1..a66181d 100644 > --- a/tools/python/xen/xend/XendStateStore.py > +++ b/tools/python/xen/xend/XendStateStore.py > @@ -101,7 +101,7 @@ class XendStateStore: > if not os.path.exists(xml_path): > return {} > > - if not os.path.getsize(xml_path) == 0: > + if os.path.getsize(xml_path) == 0: > return {} > > dom = minidom.parse(xml_path) > -- > 1.7.11.7