Browse Source

Dispatching custom objects, slots supported.

main
Davorin Kunstelj 10 years ago
parent
commit
719a6c9b33
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/SOAPpy/SOAPBuilder.py

+ 3
- 1
src/SOAPpy/SOAPBuilder.py View File

@@ -679,8 +679,10 @@ class SOAPBuilder:
self.out.append('<%s%s%s>\n' % (tag, id, r)) self.out.append('<%s%s%s>\n' % (tag, id, r))


d1 = getattr(obj, '__dict__', None) 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: if d1 is not None:
for (k, v) in d1:
for (k, v) in d1.items():
if k[0] != "_": if k[0] != "_":
self.dump(v, k, 1, ns_map) self.dump(v, k, 1, ns_map)




Loading…
Cancel
Save