X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7fde9a0a090e5f092b946f7569f1350778a47574..64eadab02f0ffd58b3b6c66c463b91abe07ecc07:/sdk/python/arvados/commands/arv_copy.py diff --git a/sdk/python/arvados/commands/arv_copy.py b/sdk/python/arvados/commands/arv_copy.py index ac24224c20..8850d0bfd5 100755 --- a/sdk/python/arvados/commands/arv_copy.py +++ b/sdk/python/arvados/commands/arv_copy.py @@ -1,4 +1,6 @@ -#! /usr/bin/env python +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: Apache-2.0 # arv-copy [--recursive] [--no-recursive] object-uuid src dst # @@ -18,6 +20,7 @@ from __future__ import division from future import standard_library +from future.utils import listvalues standard_library.install_aliases() from past.builtins import basestring from builtins import object @@ -157,7 +160,7 @@ def main(): abort("cannot copy object {} of type {}".format(args.object_uuid, t)) # Clean up any outstanding temp git repositories. - for d in list(local_repo_dir.values()): + for d in listvalues(local_repo_dir): shutil.rmtree(d, ignore_errors=True) # If no exception was thrown and the response does not have an @@ -804,7 +807,7 @@ def select_git_url(api, repo_name, retries, allow_insecure_http, allow_insecure_ if git_url.startswith("http:"): if allow_insecure_http: - logger.warn("Using insecure git url %s but will allow this because %s", git_url, allow_insecure_http_opt) + logger.warning("Using insecure git url %s but will allow this because %s", git_url, allow_insecure_http_opt) else: raise Exception("Refusing to use insecure git url %s, use %s if you really want this." % (git_url, allow_insecure_http_opt))