except (subprocess.CalledProcessError, OSError):
raise GbsError("failed to run %s in %s" % (' '.join(cmd), git_path))
output = outp.communicate()[0]
- if not output.startswith('tree %s' % git_object):
+ if not output.decode().startswith('tree %s' % git_object):
# packaging_dir is a symlink
packaging_dir = output
check = lambda fname, dir_only=False: file_exists_in_rev(git_path,
raise GbsError('failed to check existence of %s in %s:%s' % (
relative_path, commit_id, str(err)))
- return output != ''
+ return output.decode() != ''
def glob_in_inc(git_path, packaging_dir, pattern):
raise GbsError('failed to glob %s in %s:%s' % (
pattern, commit_id, str(err)))
- return fnmatch.filter(output.splitlines(), pattern)
+ return fnmatch.filter(output.decode().splitlines(), pattern)
def get_editor_cmd():