Revision 7eed4433 lib/utils/__init__.py
b/lib/utils/__init__.py | ||
---|---|---|
98 | 98 |
|
99 | 99 |
if ktype in (constants.VTYPE_STRING, constants.VTYPE_MAYBE_STRING): |
100 | 100 |
if target[key] is None and ktype == constants.VTYPE_MAYBE_STRING: |
101 |
msg = "'None' is not a valid Maybe value. Use 'VALUE_HS_NOTHING'" |
|
102 |
raise errors.TypeEnforcementError(msg) |
|
103 |
elif (target[key] == constants.VALUE_HS_NOTHING |
|
104 |
and ktype == constants.VTYPE_MAYBE_STRING): |
|
101 | 105 |
pass |
102 | 106 |
elif not isinstance(target[key], basestring): |
103 | 107 |
if isinstance(target[key], bool) and not target[key]: |
Also available in: Unified diff