mirror of
https://github.com/chubin/cheat.sh.git
synced 2024-11-25 06:22:14 +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()
|
||||
state_filename = os.path.join(local_repository_dir, '.cached_revision')
|
||||
open(state_filename, 'w').write(state)
|
||||
open(state_filename, 'wb').write(state)
|
||||
|
||||
@classmethod
|
||||
def get_state(cls):
|
||||
|
@ -136,6 +136,7 @@ def _update_adapter(adptr):
|
||||
updates = []
|
||||
if cmd:
|
||||
errorcode, output = _run_cmd(cmd)
|
||||
output = output.decode("utf-8")
|
||||
if errorcode:
|
||||
_log("\nERROR:\n---\n" + output + "\n---\nCould not get list of pages to be updated: %s" % adptr)
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user