Commits

Marc Abramowitz committed 4c8eb7e

Fix issue 10: scripttest.backwardscompat.string fails in Python 2 when
input is a unicode

Refs https://bitbucket.org/ianb/scripttest/issue/10/scripttestbackwardscompatstring-fails-in

Comments (0)

Files changed (1)

scripttest/backwardscompat.py

             return string
         return str(string, "utf-8")
     else:
+        if isinstance(string, unicode):
+            return string
         return string.decode('utf-8')