summaryrefslogtreecommitdiff
path: root/suds/mx/appender.py
diff options
context:
space:
mode:
Diffstat (limited to 'suds/mx/appender.py')
-rw-r--r--suds/mx/appender.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/suds/mx/appender.py b/suds/mx/appender.py
index 0501415..206abc0 100644
--- a/suds/mx/appender.py
+++ b/suds/mx/appender.py
@@ -191,7 +191,7 @@ class PrimativeAppender(Appender):
if content.tag.startswith('_'):
attr = content.tag[1:]
value = tostr(content.value)
- if value is not None and len(value):
+ if value:
parent.set(attr, value)
else:
child = self.node(content)
@@ -305,6 +305,12 @@ class TextAppender(Appender):
"""
def append(self, parent, content):
- child = self.node(content)
- child.setText(content.value)
- parent.append(child)
+ if content.tag.startswith('_'):
+ attr = content.tag[1:]
+ value = tostr(content.value)
+ if value:
+ parent.set(attr, value)
+ else:
+ child = self.node(content)
+ child.setText(content.value)
+ parent.append(child)