summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjortel <devnull@localhost>2010-01-25 21:15:44 +0000
committerjortel <devnull@localhost>2010-01-25 21:15:44 +0000
commit311c11dc90bf884fc12f9c831407d83382d09b56 (patch)
treeb72acdc1496e0a86840b5f977d7294fb2e4880bf
parent60a4ef347f39c0dc5fc10a2b0a11360e4291e17e (diff)
downloadsuds-311c11dc90bf884fc12f9c831407d83382d09b56.tar.gz
Move Text object pickling to the Text class.
-rw-r--r--suds/sax/text.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/suds/sax/text.py b/suds/sax/text.py
index 5b3c151..c4793a1 100644
--- a/suds/sax/text.py
+++ b/suds/sax/text.py
@@ -89,6 +89,16 @@ class Text(unicode):
s.append(' <escaped>')
return ''.join(s)
+ def __getstate__(self):
+ state = {}
+ for k in self.__slots__:
+ state[k] = getattr(self, k)
+ return state
+
+ def __setstate__(self, state):
+ for k in self.__slots__:
+ setattr(self, k, state[k])
+
class Raw(Text):
"""