diff options
Diffstat (limited to 'src/parser.py')
-rw-r--r-- | src/parser.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/parser.py b/src/parser.py index 50fe810..7b2a854 100644 --- a/src/parser.py +++ b/src/parser.py @@ -84,7 +84,10 @@ class DBusXMLParser: elif self.state == DBusXMLParser.STATE_METHOD: if name == DBusXMLParser.STATE_ARG: self.state = DBusXMLParser.STATE_ARG - arg = dbustypes.Arg(attrs['name'], attrs['type']) + arg_name = None + if attrs.has_key('name'): + arg_name = attrs['name'] + arg = dbustypes.Arg(arg_name, attrs['type']) direction = attrs['direction'] if direction == 'in': self._cur_object.in_args.append(arg) @@ -103,7 +106,10 @@ class DBusXMLParser: elif self.state == DBusXMLParser.STATE_SIGNAL: if name == DBusXMLParser.STATE_ARG: self.state = DBusXMLParser.STATE_ARG - arg = dbustypes.Arg(attrs['name'], attrs['type']) + arg_name = None + if attrs.has_key('name'): + arg_name = attrs['name'] + arg = dbustypes.Arg(arg_name, attrs['type']) self._cur_object.args.append(arg) self._cur_object = arg elif name == DBusXMLParser.STATE_ANNOTATION: |