diff options
Diffstat (limited to 'lorrycontroller')
-rw-r--r-- | lorrycontroller/gerrit.py | 5 | ||||
-rw-r--r-- | lorrycontroller/gitano.py | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/lorrycontroller/gerrit.py b/lorrycontroller/gerrit.py index 042a621..6ae24e3 100644 --- a/lorrycontroller/gerrit.py +++ b/lorrycontroller/gerrit.py @@ -34,7 +34,10 @@ class Gerrit(object): '%s@%s' % (user, host)] def _ssh_command(self, command): - return cliapp.runcmd(self._ssh_command_args + command) + out = cliapp.runcmd(self._ssh_command_args + command) + if isinstance(out, bytes): + out = out.decode('utf-8', errors='replace') + return out def has_project(self, name): # There's no 'does this project exist' command in Gerrit 2.9.4; 'list diff --git a/lorrycontroller/gitano.py b/lorrycontroller/gitano.py index d0d1a0c..b5b860c 100644 --- a/lorrycontroller/gitano.py +++ b/lorrycontroller/gitano.py @@ -91,6 +91,9 @@ class GitanoCommand(object): exit, stdout, stderr = cliapp.runcmd_unchecked( base_argv + quoted_args) + if isinstance(stdout, bytes): + stdout = stdout.decode('utf-8', errors='replace') + stderr = stderr.decode('utf-8', errors='replace') if exit != 0: logging.error( |