diff options
author | jortel <devnull@localhost> | 2010-05-03 14:41:38 +0000 |
---|---|---|
committer | jortel <devnull@localhost> | 2010-05-03 14:41:38 +0000 |
commit | 3e34e48598eba306261b4401e4735d18c1eec673 (patch) | |
tree | 357da28b02dccc9f7b6b8ccea270821148bf762e | |
parent | 02a160b70dd07323881494ea2e66b68188933a44 (diff) | |
download | suds-3e34e48598eba306261b4401e4735d18c1eec673.tar.gz |
Fixed ticket #313. Fix attribute handling for TextAppender.
-rw-r--r-- | suds/__init__.py | 2 | ||||
-rw-r--r-- | suds/mx/appender.py | 14 |
2 files changed, 11 insertions, 5 deletions
diff --git a/suds/__init__.py b/suds/__init__.py index 6a9cacc..b403d43 100644 --- a/suds/__init__.py +++ b/suds/__init__.py @@ -27,7 +27,7 @@ import sys # __version__ = '0.4' -__build__="(beta) R671-20100405" +__build__="(beta) R674-20100503" # # Exceptions 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) |