diff options
author | wangbiao <biao716.wang@samsung.com> | 2024-03-01 14:26:57 +0900 |
---|---|---|
committer | wangbiao <biao716.wang@samsung.com> | 2024-03-01 14:26:57 +0900 |
commit | 2646b085ee87854748be50a4f8ad1280845c3b8f (patch) | |
tree | f140ce5862834e9852da73c8a984fe5de8ef3c97 | |
parent | fe175eb09553df424ca43313ee095fc7793a11b7 (diff) | |
download | git-buildpackage-2646b085ee87854748be50a4f8ad1280845c3b8f.tar.gz git-buildpackage-2646b085ee87854748be50a4f8ad1280845c3b8f.tar.bz2 git-buildpackage-2646b085ee87854748be50a4f8ad1280845c3b8f.zip |
gbp/git/vfs.py:fix initial_value must be str or None, not bytesdebian/0.9.36
Change-Id: I2855cfd6b6fb10b0bce863ddc3af57f83e158d89
Signed-off-by: wangbiao <biao716.wang@samsung.com>
-rw-r--r-- | gbp/git/vfs.py | 6 |
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() |