ext/block: accept any boolean value for 'read-only' option
Be consistent with other parts of the Admin API. Especially ...Attach accept "standard" boolean values for persistent= option.
This commit is contained in:
parent
af60fbb25d
commit
451cc339c7
@ -243,10 +243,8 @@ class BlockDeviceExtension(qubes.ext.Extension):
|
||||
raise qubes.exc.QubesValueError(
|
||||
'Invalid frontend-dev option value: ' + value)
|
||||
elif option == 'read-only':
|
||||
if value not in ('yes', 'no'):
|
||||
raise qubes.exc.QubesValueError(
|
||||
'read-only option can only have '
|
||||
'\'yes\' or \'no\' value')
|
||||
options[option] = (
|
||||
'yes' if qubes.property.bool(None, None, value) else 'no')
|
||||
elif option == 'devtype':
|
||||
if value not in ('disk', 'cdrom'):
|
||||
raise qubes.exc.QubesValueError(
|
||||
|
Loading…
Reference in New Issue
Block a user