qvm-prefs: unify 'seamless_gui_mode' with other true/false properties

This commit is contained in:
Marek Marczykowski-Górecki 2015-10-05 05:53:48 +02:00
parent 7be7cf2c5e
commit 0e37ac617a
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -445,14 +445,7 @@ def set_seamless_gui_mode(vms, vm, args):
print >> sys.stderr, "Missing value (true/false)!"
return False
if not args[0].lower() in ['true', 'false']:
print >> sys.stderr, "Invalid value, expected 'true' or 'false'"
return False
if args[0].lower() == 'true':
vm.seamless_gui_mode = True
else:
vm.seamless_gui_mode = False
vm.seamless_gui_mode = bool(eval(args[0].capitalize()))
return True
def set_autostart(vms, vm, args):