mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-10-26 17:25:22 +03:00
cli: Explicitly error on cli options like --disk readonly
All options should be opt=val pairs, but we behaved weirdly on missing = before.
This commit is contained in:
parent
443ae1b303
commit
6e06b3642b
@ -1070,7 +1070,12 @@ class VirtOptionString(object):
|
||||
virtargmap, remove_first)
|
||||
|
||||
def get_opt_param(self, key):
|
||||
return self.opts.pop(key, None)
|
||||
if key not in self.opts:
|
||||
return None
|
||||
ret = self.opts.pop(key)
|
||||
if ret is None:
|
||||
raise RuntimeError("Option '%s' had no value set." % key)
|
||||
return ret
|
||||
|
||||
def check_leftover_opts(self):
|
||||
if not self.opts:
|
||||
|
Loading…
Reference in New Issue
Block a user