Update taskcluster.py

I copied ``maybe_download_tc_bin`` syntax in order to make the code easier to follow.
This commit is contained in:
juandspy 2020-01-22 16:22:15 +01:00 committed by GitHub
parent 616760eb52
commit 29a92e098f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,7 +147,9 @@ def main():
maybe_download_tc(target_dir=args.target, tc_url=get_tc_url(args.arch, args.artifact, args.branch))
if args.artifact == "convert_graphdef_memmapped_format":
subprocess.check_call(['chmod', '+x', os.path.join(args.target, args.artifact)])
convert_graph_file = os.path.join(args.target, args.artifact)
final_stat = os.stat(convert_graph_file)
os.chmod(convert_graph_file, final_stat.st_mode | stat.S_IEXEC)
if '.tar.' in args.artifact:
subprocess.check_call(['tar', 'xvf', os.path.join(args.target, args.artifact), '-C', args.target])