diff options
author | Ryan Harrison <zoddicus@users.noreply.github.com> | 2019-05-31 07:51:30 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-31 07:51:30 -0700 |
commit | 7c7f9c6abe008b899506ca3bf34f196dd218ef25 (patch) | |
tree | c4d4ce4d7340a4c5330a041a280ee17122d62e3f /tools | |
parent | f8e6fbd4d6ace6280e80e50635a6874690a6a2be (diff) | |
download | amber-7c7f9c6abe008b899506ca3bf34f196dd218ef25.tar.gz |
Convert git-sync-deps to Python 3 (#533)
Fixes #528
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/git-sync-deps | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/git-sync-deps b/tools/git-sync-deps index 74a0952..4da1217 100755 --- a/tools/git-sync-deps +++ b/tools/git-sync-deps @@ -52,6 +52,7 @@ Git Config: """ +from builtins import bytes import os import subprocess import sys @@ -116,7 +117,7 @@ def is_git_toplevel(git, directory): try: toplevel = subprocess.check_output( [git, 'rev-parse', '--show-toplevel'], cwd=directory).strip() - return os.path.realpath(directory) == os.path.realpath(toplevel) + return os.path.realpath(bytes(directory, 'utf8')) == os.path.realpath(toplevel) except subprocess.CalledProcessError: return False @@ -189,7 +190,7 @@ def git_checkout_to_directory(git, repo, checkoutable, directory, verbose): def parse_file_to_dict(path): dictionary = {} - execfile(path, dictionary) + exec(compile(open(path).read(), path, 'exec'), dictionary) return dictionary @@ -213,7 +214,7 @@ def git_sync_deps(deps_file_path, command_line_os_requests, verbose): dependencies = deps_file['deps'].copy() os_specific_dependencies = deps_file.get('deps_os', dict()) if 'all' in command_line_os_requests: - for value in os_specific_dependencies.itervalues(): + for value in os_specific_dependencies.values(): dependencies.update(value) else: for os_name in command_line_os_requests: |