File 26088-xend-xml-filesize-check.patch of Package xen.openSUSE_12.1_Update

# HG changeset patch
# User Joe Jin <joe.jin@oracle.com>
# Date 1350549308 -3600
# Node ID dd64a1bdbe3a2f141b729ee086016a3f40615daf
# Parent  6239ace16749ae8f80a765d4b284ffec4153a05c
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>

diff -r 6239ace16749 -r dd64a1bdbe3a tools/python/xen/xend/XendStateStore.py
--- a/tools/python/xen/xend/XendStateStore.py	Thu Oct 18 09:35:07 2012 +0100
+++ b/tools/python/xen/xend/XendStateStore.py	Thu Oct 18 09:35:08 2012 +0100
@@ -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)
openSUSE Build Service is sponsored by