add check if kvm_options.py is exists
authorJens Kasten <jens@kasten-edv.de>
Tue, 27 Mar 2012 03:26:05 +0200
changeset 107 b97f5da612bd
parent 106 c0c9e51ce567
child 108 8d893ea5aaeb
add check if kvm_options.py is exists
kvmtools/config/kvm_parser.py
--- a/kvmtools/config/kvm_parser.py	Tue Mar 27 03:07:13 2012 +0200
+++ b/kvmtools/config/kvm_parser.py	Tue Mar 27 03:26:05 2012 +0200
@@ -52,11 +52,12 @@
                             raise RuntimeError(msg)
                         # remove all withespace from string
                         key = re.sub(r'\s', '', temp[0])
-                        if key not in Header().exclude_options \
-                            and key not in kvm_options:
-                            print "Not a qemu-kvm command: '%s' in %s on line %s" % \
-                                 (key, config_file, counter)
-                            sys.exit(1)
+                        if IS_QEMU_KVM_OPTION:
+                            if key not in Header().exclude_options \
+                                and key not in kvm_options:
+                                print "Not a qemu-kvm command: '%s' in %s on line %s" % \
+                                     (key, config_file, counter)
+                                sys.exit(1)
                         # remove comments
                         if len(temp) == 1:
                             msg = "Missing value in %s on line %s" % \