14930: Adds expiration notice in local time at the end of the run.
[arvados.git] / sdk / python / arvados / commands / arv_copy.py
index ac24224c2001192b9c42e29e10724703ba0ab32c..8850d0bfd5a82c10633a3b39d0d5958961ead940 100755 (executable)
@@ -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))