[dak/master] textutils.py: don't try to convert unicode strings again
---
daklib/textutils.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/daklib/textutils.py b/daklib/textutils.py
index 03df5d8..c9cc4ed 100644
--- a/daklib/textutils.py
+++ b/daklib/textutils.py
@@ -34,6 +34,8 @@ def force_to_utf8(s):
Forces a string to UTF-8. If the string isn't already UTF-8,
it's assumed to be ISO-8859-1.
"""
+ if isinstance(s, unicode):
+ return s
try:
unicode(s, 'utf-8')
return s
--
1.7.2.5
Reply to: