aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-04-23 10:09:16 +0100
committerKeir Fraser <keir.fraser@citrix.com>2009-04-23 10:09:16 +0100
commit00f3705554e7e38fe63a545350fe4ee158755f06 (patch)
treed0abaa74b4d9dd168be1517c994494e9c1023ca6
parentda27f6d8b7134ce4c1fb7af186a2e11d49af6ac7 (diff)
downloadxen-00f3705554e7e38fe63a545350fe4ee158755f06.tar.gz
xen-00f3705554e7e38fe63a545350fe4ee158755f06.tar.bz2
xen-00f3705554e7e38fe63a545350fe4ee158755f06.zip
xend: Do not overwrite xauthority and display with empty values
Display and xauthority vars are read from vmConfig['platform'] first, then they are read again from dev_info. However if the user does not set those variable in the config file, dev_info won't contain them, hence we are going to overwrite the current significant values with null. This patch fixes the problem setting display and xauthority to the current values if dev_info does not contain them. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
-rw-r--r--tools/python/xen/xend/image.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/python/xen/xend/image.py b/tools/python/xen/xend/image.py
index 9e978b97aa..411936d5d6 100644
--- a/tools/python/xen/xend/image.py
+++ b/tools/python/xen/xend/image.py
@@ -291,8 +291,8 @@ class ImageHandler:
if int(dev_info.get('sdl', 0)) != 0 :
has_sdl = True
if has_sdl:
- self.display = dev_info.get('display', {})
- self.xauthority = dev_info.get('xauthority', {})
+ self.display = dev_info.get('display', self.display)
+ self.xauthority = dev_info.get('xauthority', self.xauthority)
opengl = int(dev_info.get('opengl', opengl))
if has_vnc:
vnc_config = dev_info.get('other_config', {})