Prefer qubes.exc.QubesValueError over ValueError

This provide clearer information for UI.
This commit is contained in:
Marek Marczykowski-Górecki 2017-03-15 18:23:09 +01:00
parent 010d40dc1e
commit 2c4303efc4
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -372,7 +372,7 @@ class property(object): # pylint: disable=redefined-builtin,invalid-name
return False
if lcvalue in ('1', 'yes', 'true', 'on'):
return True
raise ValueError(
raise qubes.exc.QubesValueError(
'Invalid literal for boolean property: {!r}'.format(value))
return bool(value)