summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-12-05 20:48:56 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-12-05 20:48:56 +0200
commit49ba8060de2ae87a4da6cb527603fa860679c565 (patch)
treeb4bd960d79c4ccd0eea6cc8e358081421df67b88
parent5fbdd25f5ee5d0dc0578fdf89f3eb2f9c3f25039 (diff)
downloadpublishing-api-49ba8060de2ae87a4da6cb527603fa860679c565.tar.gz
Create MANIFEST outside src_dir, as it may be not writable by us.
Change-Id: Ia204b10ca3af37a562f38f471a16d46ecdc94ce6
-rwxr-xr-xlinaro-cp.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/linaro-cp.py b/linaro-cp.py
index 095837d..50284f4 100755
--- a/linaro-cp.py
+++ b/linaro-cp.py
@@ -78,7 +78,7 @@ class API_v1(object):
manifest = None
if options.manifest:
- manifest = open(src + "/MANIFEST", "w")
+ manifest = tempfile.NamedTemporaryFile(prefix="MANIFEST", delete=False)
for root, dirs, files in os.walk(src_dir):
rel_dir = root[len(src_dir) + 1:]
@@ -106,7 +106,7 @@ class API_v1(object):
manifest.close()
dst_file = '%s%s/%s' % (
self.api_base, dst, 'MANIFEST')
- transfer_queue[dst_file] = src_dir + "/MANIFEST"
+ transfer_queue[dst_file] = manifest.name
return transfer_queue
def upload(self, src, dst, options):