xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools: xend: fix wrong condition check for xml file
@ 2012-10-16  2:39 Joe Jin
  2012-10-17 18:27 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Jin @ 2012-10-16  2:39 UTC (permalink / raw)
  To: chuang cao, Konrad Rzeszutek Wilk; +Cc: xen-devel@lists.xensource.com

Hi Konrad,

Would you please review below fix?

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 <chuang.cao@oracle.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools: xend: fix wrong condition check for xml file
  2012-10-16  2:39 [PATCH] tools: xend: fix wrong condition check for xml file Joe Jin
@ 2012-10-17 18:27 ` Konrad Rzeszutek Wilk
  2012-10-18  8:35   ` Ian Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2012-10-17 18:27 UTC (permalink / raw)
  To: Joe Jin; +Cc: chuang cao, xen-devel@lists.xensource.com

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 <konrad.wilk@oracle.com>
> 
> 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 <chuang.cao@oracle.com>
> Signed-off-by: Joe Jin <joe.jin@oracle.com>
> ---
>  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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools: xend: fix wrong condition check for xml file
  2012-10-17 18:27 ` Konrad Rzeszutek Wilk
@ 2012-10-18  8:35   ` Ian Campbell
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Campbell @ 2012-10-18  8:35 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: chuang cao, Joe Jin, xen-devel@lists.xensource.com

On Wed, 2012-10-17 at 19:27 +0100, Konrad Rzeszutek Wilk wrote:
> 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 <konrad.wilk@oracle.com>

Applied, thanks.

> > 
> > 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 <chuang.cao@oracle.com>
> > Signed-off-by: Joe Jin <joe.jin@oracle.com>
> > ---
> >  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
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-18  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-16  2:39 [PATCH] tools: xend: fix wrong condition check for xml file Joe Jin
2012-10-17 18:27 ` Konrad Rzeszutek Wilk
2012-10-18  8:35   ` Ian Campbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).