From: Joe Jin <joe.jin@oracle.com>
To: chuang cao <chuang.cao@oracle.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: [PATCH] tools: xend: fix wrong condition check for xml file
Date: Tue, 16 Oct 2012 10:39:48 +0800 [thread overview]
Message-ID: <507CC8F4.4080103@oracle.com> (raw)
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
next reply other threads:[~2012-10-16 2:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 2:39 Joe Jin [this message]
2012-10-17 18:27 ` [PATCH] tools: xend: fix wrong condition check for xml file Konrad Rzeszutek Wilk
2012-10-18 8:35 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=507CC8F4.4080103@oracle.com \
--to=joe.jin@oracle.com \
--cc=chuang.cao@oracle.com \
--cc=konrad.wilk@oracle.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.