mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-28 20:28:39 +03:00
Decode bytes to str (fetch.py) (fixes #291)
This commit is contained in:
parent
74876d6d94
commit
562875eda6
@ -134,7 +134,7 @@ class GitRepositoryAdapter(RepositoryAdapter): #pylint: disable=abstract-meth
|
|||||||
"""
|
"""
|
||||||
local_repository_dir = cls.local_repository_location()
|
local_repository_dir = cls.local_repository_location()
|
||||||
state_filename = os.path.join(local_repository_dir, '.cached_revision')
|
state_filename = os.path.join(local_repository_dir, '.cached_revision')
|
||||||
open(state_filename, 'w').write(state)
|
open(state_filename, 'wb').write(state)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_state(cls):
|
def get_state(cls):
|
||||||
|
@ -136,6 +136,7 @@ def _update_adapter(adptr):
|
|||||||
updates = []
|
updates = []
|
||||||
if cmd:
|
if cmd:
|
||||||
errorcode, output = _run_cmd(cmd)
|
errorcode, output = _run_cmd(cmd)
|
||||||
|
output = output.decode("utf-8")
|
||||||
if errorcode:
|
if errorcode:
|
||||||
_log("\nERROR:\n---\n" + output + "\n---\nCould not get list of pages to be updated: %s" % adptr)
|
_log("\nERROR:\n---\n" + output + "\n---\nCould not get list of pages to be updated: %s" % adptr)
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user