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(
|
raise qubes.exc.QubesValueError(
|
||||||
'Invalid frontend-dev option value: ' + value)
|
'Invalid frontend-dev option value: ' + value)
|
||||||
elif option == 'read-only':
|
elif option == 'read-only':
|
||||||
if value not in ('yes', 'no'):
|
options[option] = (
|
||||||
raise qubes.exc.QubesValueError(
|
'yes' if qubes.property.bool(None, None, value) else 'no')
|
||||||
'read-only option can only have '
|
|
||||||
'\'yes\' or \'no\' value')
|
|
||||||
elif option == 'devtype':
|
elif option == 'devtype':
|
||||||
if value not in ('disk', 'cdrom'):
|
if value not in ('disk', 'cdrom'):
|
||||||
raise qubes.exc.QubesValueError(
|
raise qubes.exc.QubesValueError(
|
||||||
|
Loading…
Reference in New Issue
Block a user