Skip to content

Commit 562875e

Browse files
committed
Decode bytes to str (fetch.py) (fixes chubin#291)
1 parent 74876d6 commit 562875e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/adapter/git_adapter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def save_state(cls, state):
134134
"""
135135
local_repository_dir = cls.local_repository_location()
136136
state_filename = os.path.join(local_repository_dir, '.cached_revision')
137-
open(state_filename, 'w').write(state)
137+
open(state_filename, 'wb').write(state)
138138

139139
@classmethod
140140
def get_state(cls):

lib/fetch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ def _update_adapter(adptr):
136136
updates = []
137137
if cmd:
138138
errorcode, output = _run_cmd(cmd)
139+
output = output.decode("utf-8")
139140
if errorcode:
140141
_log("\nERROR:\n---\n" + output + "\n---\nCould not get list of pages to be updated: %s" % adptr)
141142
return False

0 commit comments

Comments
 (0)