# HG changeset patch
# User emellor@ewan
# Node ID 625c75a223fe0c7f63a048a89bb914096b88f74d
# Parent 7f42935cb4b0befbd89f4e4d14c4f169f7880e26
Cope with missing configuration information inside the configuration method.
This allows us to better recover if the store has been deleted.
Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
diff -r 7f42935cb4b0 -r 625c75a223fe tools/python/xen/xend/server/blkif.py
--- a/tools/python/xen/xend/server/blkif.py Tue Oct 4 01:25:04 2005
+++ b/tools/python/xen/xend/server/blkif.py Tue Oct 4 01:28:41 2005
@@ -69,8 +69,10 @@
'dev', 'type', 'params',
'read-only')
- result.append(['dev', dev])
- result.append(['uname', typ + ":" + params])
+ if dev:
+ result.append(['dev', dev])
+ if typ and params:
+ result.append(['uname', typ + ":" + params])
if ro:
result.append(['mode', 'r'])
else:
diff -r 7f42935cb4b0 -r 625c75a223fe tools/python/xen/xend/server/netif.py
--- a/tools/python/xen/xend/server/netif.py Tue Oct 4 01:25:04 2005
+++ b/tools/python/xen/xend/server/netif.py Tue Oct 4 01:28:41 2005
@@ -80,11 +80,15 @@
'script', 'ip', 'bridge',
'mac')
- result.append(['script',
- script.replace(xroot.network_script_dir + os.sep, "")])
+ if script:
+ result.append(['script',
+ script.replace(xroot.network_script_dir + os.sep,
+ "")])
if ip:
result.append(['ip', ip.split(" ")])
- result.append(['bridge', bridge])
- result.append(['mac', mac])
+ if bridge:
+ result.append(['bridge', bridge])
+ if mac:
+ result.append(['mac', mac])
return result
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|