aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-11-17 08:43:44 -0500
committerW. Trevor King <wking@drexel.edu>2009-11-17 08:43:44 -0500
commit2f867266d4b47cc8ca0c7ccb3768d240e5096f11 (patch)
treef1d08dbee817adcac95dc15d69523b86389e4ec6
parenteaa6d158608b0b47c337fc1433902532bc646128 (diff)
downloadbugseverywhere-2f867266d4b47cc8ca0c7ccb3768d240e5096f11.tar.gz
Don't attempt to convert unicode objects to strings in *._setting_attr_string()
-rw-r--r--libbe/bug.py4
-rw-r--r--libbe/comment.py4
2 files changed, 6 insertions, 2 deletions
diff --git a/libbe/bug.py b/libbe/bug.py
index fd30ff7..6633ab7 100644
--- a/libbe/bug.py
+++ b/libbe/bug.py
@@ -267,7 +267,9 @@ class Bug(settings_object.SavedSettingsObject):
value = getattr(self, setting)
if value == None:
return ""
- return str(value)
+ if type(value) not in types.StringTypes:
+ return str(value)
+ return value
def xml(self, show_comments=False):
if self.bugdir == None:
diff --git a/libbe/comment.py b/libbe/comment.py
index 02bcc93..17daf62 100644
--- a/libbe/comment.py
+++ b/libbe/comment.py
@@ -308,7 +308,9 @@ class Comment(Tree, settings_object.SavedSettingsObject):
value = getattr(self, setting)
if value == None:
return ""
- return str(value)
+ if type(value) not in types.StringTypes:
+ return str(value)
+ return value
def xml(self, indent=0, shortname=None):
"""