Browse files

simplify algorithm to make it more robust

  • Loading branch information...
1 parent 8de6e43 commit b8de21b6890f24641d864909cae674d418b4457c @sigma committed May 8, 2010
Showing with 1 addition and 9 deletions.
  1. +1 −9 zsi/ZSI/TC.py
View
10 zsi/ZSI/TC.py
@@ -727,17 +727,9 @@ def text_to_data(self, text, elt, ps):
return text.encode(UNICODE_ENCODING)
def get_formatted_content(self, pyobj):
- found = False
- for typ in _stringtypes:
- if isinstance(pyobj, typ):
- found = True
- break
- if not found:
- pyobj = str(pyobj)
if isinstance(pyobj, unicode):
return pyobj.encode(UNICODE_ENCODING)
- return pyobj
-
+ return str(pyobj)
class URI(String):
'''A URI.

0 comments on commit b8de21b

Please sign in to comment.