summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2011-08-03 10:57:03 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2011-08-03 10:57:03 -0400
commitcc00ecfe764862a2e73a783e80d3172592b23669 (patch)
tree430de14166af111cf25cc929529c428f3270e8d3
parentd17441552e2087c65c68efb14eaff3843302c363 (diff)
downloadaskbot-cc00ecfe764862a2e73a783e80d3172592b23669.tar.gz
askbot-cc00ecfe764862a2e73a783e80d3172592b23669.tar.bz2
askbot-cc00ecfe764862a2e73a783e80d3172592b23669.zip
replaced use of str() with unicode() in some places where data can be in unicode
-rw-r--r--askbot/forms.py2
-rw-r--r--askbot/importers/stackexchange/management/commands/load_stackexchange.py2
-rw-r--r--askbot/utils/http.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/askbot/forms.py b/askbot/forms.py
index 153d56e6..fb81f851 100644
--- a/askbot/forms.py
+++ b/askbot/forms.py
@@ -291,7 +291,7 @@ class ShowQuestionForm(forms.Form):
or invalid"""
if self._errors:
#since the form is always valid, clear the errors
- logging.error(str(self._errors))
+ logging.error(unicode(self._errors))
self._errors = {}
in_data = self.get_pruned_data()
diff --git a/askbot/importers/stackexchange/management/commands/load_stackexchange.py b/askbot/importers/stackexchange/management/commands/load_stackexchange.py
index f6f56578..27e97665 100644
--- a/askbot/importers/stackexchange/management/commands/load_stackexchange.py
+++ b/askbot/importers/stackexchange/management/commands/load_stackexchange.py
@@ -248,7 +248,7 @@ class X(object):#
#crude method of getting id provider name from the url
@classmethod
def get_openid_provider_name(cls, openid_url):
- openid_str = str(openid_url)
+ openid_str = unicode(openid_url)
bits = openid_str.split('/')
base_url = bits[2] #assume this is base url
url_bits = base_url.split('.')
diff --git a/askbot/utils/http.py b/askbot/utils/http.py
index 2c45b248..e9a57012 100644
--- a/askbot/utils/http.py
+++ b/askbot/utils/http.py
@@ -39,7 +39,7 @@ def get_request_info(request):
elif request.method == 'POST':
data = request.POST
data = hide_passwords(copy(data))
- info += 'data: %s\n' % str(data)
+ info += 'data: %s\n' % unicode(data)
info += 'host: %s\n' % request.get_host()
if request.user.is_authenticated():
info += 'user ID: %d\n' % request.user.id