summaryrefslogtreecommitdiff
path: root/kbas
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-03-02 14:23:09 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-03-02 14:24:54 +0900
commit2d943c825777a234a44e8723fcb41fbc3dbd26e9 (patch)
treee75913c2dedb0ee67ea897df4cce7569564b628f /kbas
parent11b0f7df266ac914a1d9094a757dbe83dd02d556 (diff)
downloadybd-2d943c825777a234a44e8723fcb41fbc3dbd26e9.tar.gz
kbas/__main__.py: Use shutil.move() instead of os.rename()
This change is not strictly required, as the move is performed completely inside a directory owned by kbas, however for consistency it's better that we use shutil.move() everywhere in one unilateral change.
Diffstat (limited to 'kbas')
-rwxr-xr-xkbas/__main__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/kbas/__main__.py b/kbas/__main__.py
index c532e3d..3879cb7 100755
--- a/kbas/__main__.py
+++ b/kbas/__main__.py
@@ -143,8 +143,8 @@ class KeyedBinaryArtifactServer(object):
checksum = cache.md5(artifact)
with open(artifact + '.md5', "a") as f:
f.write(checksum)
- os.rename(tmpdir, os.path.join(app.config['artifact-dir'],
- cache_id))
+ shutil.move(tmpdir, os.path.join(app.config['artifact-dir'],
+ cache_id))
response.status = 201 # success!
return
except: