1.1 --- a/imiptools/content.py Mon Oct 27 16:37:31 2014 +0100
1.2 +++ b/imiptools/content.py Mon Oct 27 17:59:35 2014 +0100
1.3 @@ -275,7 +275,9 @@
1.4
1.5 """
1.6 Parse the iTIP content from 'f' having the given 'encoding'. If 'objtype' is
1.7 - given, only objects of that type will be returned.
1.8 + given, only objects of that type will be returned. Otherwise, the root of
1.9 + the content will be returned as a dictionary with a single key indicating
1.10 + the object type.
1.11
1.12 Return None if the content was not readable or suitable.
1.13 """
1.14 @@ -286,7 +288,7 @@
1.15 if objtype and doctype == objtype:
1.16 return to_dict(obj)[objtype][0]
1.17 elif not objtype:
1.18 - return to_dict(obj)[doctype][0]
1.19 + return to_dict(obj)
1.20 finally:
1.21 f.close()
1.22 except (ParseError, ValueError):