raise ConfigError
This commit is contained in:
parent
1c70a07d7e
commit
9cf30d214d
@ -181,7 +181,7 @@ class Values(object):
|
|||||||
|
|
||||||
def setowner(self, opt, owner):
|
def setowner(self, opt, owner):
|
||||||
if opt not in self._values:
|
if opt not in self._values:
|
||||||
raise ConfigError(_('no value for {1} cannot change owner to {2}').format(opt))
|
raise ConfigError(_('no value for {0} cannot change owner to {1}').format(opt._name, owner))
|
||||||
if not isinstance(owner, owners.Owner):
|
if not isinstance(owner, owners.Owner):
|
||||||
raise TypeError(_("invalid generic owner {0}").format(str(owner)))
|
raise TypeError(_("invalid generic owner {0}").format(str(owner)))
|
||||||
self._values[opt] = (owner, self._values[opt][1])
|
self._values[opt] = (owner, self._values[opt][1])
|
||||||
|
Loading…
Reference in New Issue
Block a user