aboutsummaryrefslogtreecommitdiffstats
path: root/tools/python
diff options
context:
space:
mode:
authorJoe Jin <joe.jin@oracle.com>2012-10-18 09:35:08 +0100
committerJoe Jin <joe.jin@oracle.com>2012-10-18 09:35:08 +0100
commit191e485a1929a02706ec3301f3185b2b89c3253f (patch)
treed2b9497ef4309555856897b465c6a72eb41e80be /tools/python
parent3623f8abe0f9f196983a7853a4d460b8be6d3be8 (diff)
downloadxen-191e485a1929a02706ec3301f3185b2b89c3253f.tar.gz
xen-191e485a1929a02706ec3301f3185b2b89c3253f.tar.bz2
xen-191e485a1929a02706ec3301f3185b2b89c3253f.zip
tools: xend: fix wrong condition check for xml file
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> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools/python')
-rw-r--r--tools/python/xen/xend/XendStateStore.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/python/xen/xend/XendStateStore.py b/tools/python/xen/xend/XendStateStore.py
index 17a29f180e..a66181d1d4 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)