outp = subprocess.Popen(cmd, stdout=subprocess.PIPE)
except (subprocess.CalledProcessError, OSError):
raise GbsError("failed to run %s in %s" % (' '.join(cmd), git_path))
- output = outp.communicate()[0]
- if not output.decode().startswith('tree %s' % git_object):
+ output = outp.communicate()[0].decode()
+ if not output.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,
try:
with Workdir(git_path):
return subprocess.Popen(args,
- stdout=subprocess.PIPE).communicate()[0]
+ stdout=subprocess.PIPE).communicate()[0].decode()
except (subprocess.CalledProcessError, OSError) as err:
log.debug('failed to checkout %s from %s:%s' % (relative_path,
commit_id, str(err)))