diff options
-rw-r--r-- | pykolab/utils.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pykolab/utils.py b/pykolab/utils.py index 29a0e95..8bc82e5 100644 --- a/pykolab/utils.py +++ b/pykolab/utils.py @@ -394,6 +394,17 @@ def normalize(_object): if not result.has_key('domain') and result.has_key('standard_domain'): result['domain'] = result['standard_domain'] + if 'objectclass' not in result: + result['objectclass'] = [] + + if result['objectclass'] is None: + result['objectclass'] = [] + + if not isinstance(result['objectclass'], list): + result['objectclass'] = [result['objectclass']] + + result['objectclass'] = [x.lower() for x in result['objectclass']] + return result def parse_input(_input, splitchars= [ ' ' ]): |