From cccb1651f5bfec957e1f055661309080e7f9c2f3 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Tue, 8 Sep 2015 16:55:47 -0400 Subject: [PATCH] Fixes for direct cloud storage copying --- storage/cloud.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storage/cloud.py b/storage/cloud.py index d333d0358..cc2750dae 100644 --- a/storage/cloud.py +++ b/storage/cloud.py @@ -224,6 +224,8 @@ class _CloudStorage(BaseStorage): return k.etag[1:-1][:7] def copy_to(self, destination, path): + self._initialize_cloud_conn() + # First try to copy directly via boto, but only if the storages are the # same type, with the same access information. if (self.__class__ == destination.__class__ and @@ -235,6 +237,7 @@ class _CloudStorage(BaseStorage): source_path = self._init_path(path) source_key = self._key_class(self._cloud_bucket, source_path) + destination._initialize_cloud_conn() dest_path = destination._init_path(path) source_key.copy(destination._cloud_bucket, dest_path) return