From 2d2e3af0eb38218105a2514cbc806d270bf06d12 Mon Sep 17 00:00:00 2001 From: mikeos Date: Sun, 21 Jul 2013 12:54:38 +0400 Subject: copy file instead of convert if possible --- utils.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'utils.py') diff --git a/utils.py b/utils.py index 9715e5d..b911630 100644 --- a/utils.py +++ b/utils.py @@ -32,6 +32,8 @@ else: return False def to_unicode(buf): + if type(buf) is bytes: + return buf.decode("utf-8") return buf def to_bytes(buf): -- cgit v1.2.3-70-g09d2