From: Ansgar Burchardt Date: Sun, 17 Jun 2012 07:33:25 +0000 (+0200) Subject: textutils.py: don't try to convert unicode strings again X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=commitdiff_plain;h=d6c4dd4efc573cdb2ccdbd8b0915bc4b0b95681a textutils.py: don't try to convert unicode strings again --- diff --git a/daklib/textutils.py b/daklib/textutils.py index 03df5d85..c9cc4ed3 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