diff options
author | Joe Jin <joe.jin@oracle.com> | 2012-11-13 18:11:09 +0000 |
---|---|---|
committer | Joe Jin <joe.jin@oracle.com> | 2012-11-13 18:11:09 +0000 |
commit | f35b874da5ace83c8e86ad913820c7447775fd38 (patch) | |
tree | 81e8df6076d39f8144f2b3e56d088779223fbeae | |
parent | 07c965c8cdc35ed20fe1270f7051961e19597c00 (diff) | |
download | xen-f35b874da5ace83c8e86ad913820c7447775fd38.tar.gz xen-f35b874da5ace83c8e86ad913820c7447775fd38.tar.bz2 xen-f35b874da5ace83c8e86ad913820c7447775fd38.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>
xen-unstable changeset: 26088:dd64a1bdbe3a
Backport-requested-by: Ian Campbell <Ian.Campbell@citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
xen-4.2-testing changeset: 25905:82b61b99d15d
Backport-requested-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-rw-r--r-- | tools/python/xen/xend/XendStateStore.py | 2 |
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) |