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@xensource.com>
This commit is contained in:
emellor@ewan committed 2005-10-04 02:28:41 +01:00
1 parent 5f189b1050
commit 3a62270915
2 files changed
+12 -6

No files matched your search

+4 -2
View File
@@ -69,8 +69,10 @@ class BlkifController(DevController):
'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:
+8 -4
View File
@@ -80,11 +80,15 @@ class NetifController(DevController):
'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
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.