summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbp/git/vfs.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gbp/git/vfs.py b/gbp/git/vfs.py
index 6f10442a..7504ef7c 100644
--- a/gbp/git/vfs.py
+++ b/gbp/git/vfs.py
@@ -29,8 +29,10 @@ class GitVfs(object):
"""
def __init__(self, content):
self._iter = iter
- self._data = io.StringIO(content)
-
+ try:
+ self._data = io.StringIO(content.decode())
+ except UnicodeDecodeError:
+ self._data = io.StringIO(content.decode("iso-8859-1"))
def readline(self):
return self._data.readline()