mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Env __setitem__: replace assert with exception
Use exception to make debugging issues easier. Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
135d0b5dd1
commit
770d4cda43
@@ -268,7 +268,8 @@ class Env(object):
|
||||
value = int(value)
|
||||
elif key == 'basedn':
|
||||
value = DN(value)
|
||||
assert type(value) in (unicode, int, float, bool, type(None), DN)
|
||||
if type(value) not in (unicode, int, float, bool, type(None), DN):
|
||||
raise TypeError(key, value)
|
||||
object.__setattr__(self, key, value)
|
||||
self.__d[key] = value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user