diff options
| author | mikeos <mike.osipov@gmail.com> | 2013-07-21 12:54:38 +0400 |
|---|---|---|
| committer | mikeos <mike.osipov@gmail.com> | 2013-07-21 12:54:38 +0400 |
| commit | 2d2e3af0eb38218105a2514cbc806d270bf06d12 (patch) | |
| tree | 69e044cecc045ab277a94f7beeae5f84beba1789 /utils.py | |
| parent | f122a7c9145a9ed61def2953f7579e5aeb9c3529 (diff) | |
copy file instead of convert if possible
Diffstat (limited to 'utils.py')
| -rw-r--r-- | utils.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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): |
