diff --git a/src/SOAPpy/SOAPBuilder.py b/src/SOAPpy/SOAPBuilder.py index 2f8f392..f4f43fd 100644 --- a/src/SOAPpy/SOAPBuilder.py +++ b/src/SOAPpy/SOAPBuilder.py @@ -679,8 +679,10 @@ class SOAPBuilder: self.out.append('<%s%s%s>\n' % (tag, id, r)) d1 = getattr(obj, '__dict__', None) + if d1 is None and hasattr(obj, "__slots__") + d1 = dict(((k, getattr(obj, k)) for k in obj.__slots__)) if d1 is not None: - for (k, v) in d1: + for (k, v) in d1.items(): if k[0] != "_": self.dump(v, k, 1, ns_map)