[PATCH] Fix DOS VMX files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>

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
 

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux