[et-mgmt-tools] [PATCH] Fix DOS VMX files
John Levon
levon at movementarian.org
Wed Jul 2 04:50:03 UTC 2008
Fix .vmx parsing for DOS files
The handling for DOS-formatted .vmx files was incorrect. Fix it up.
Signed-off-by: John Levon <john.levon at sun.com>
diff --git a/virt-convert b/virt-convert
--- a/virt-convert
+++ b/virt-convert
@@ -223,9 +223,10 @@ def parse_vmware_config(options):
before_eq, after_eq = line.split("=", 1)
key = before_eq.replace(" ","")
value = after_eq.replace('"',"")
- record[key] = value.strip()
- logging.debug("Key: %s Value: %s" % (key, value))
- if value.endswith("vmdk\n"): # separate disks from config
+ value = value.strip()
+ record[key] = value
+ logging.debug("Key: %s Value: \"%s\"" % (key, value))
+ if value.endswith("vmdk"): # separate disks from config
disks_list.append(value)
return record, disks_list
More information about the et-mgmt-tools
mailing list