diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-03-02 14:23:09 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-03-02 14:24:54 +0900 |
commit | 2d943c825777a234a44e8723fcb41fbc3dbd26e9 (patch) | |
tree | e75913c2dedb0ee67ea897df4cce7569564b628f /kbas | |
parent | 11b0f7df266ac914a1d9094a757dbe83dd02d556 (diff) | |
download | ybd-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-x | kbas/__main__.py | 4 |
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: |