aboutsummaryrefslogtreecommitdiff
path: root/gn3/fs_helpers.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2022-02-21 17:55:08 +0300
committerFrederick Muriuki Muriithi2022-02-21 17:55:08 +0300
commit393700a432e25336c5afd1f008152202853f5bc2 (patch)
tree745e946f9441d33cfb4461e0dfc62c82baa40cc9 /gn3/fs_helpers.py
parenta35fce27875d9db80dce1976b6f8ee8c00ecfe0a (diff)
downloadgenenetwork3-393700a432e25336c5afd1f008152202853f5bc2.tar.gz
Fix minor issues introduced while fixing linting errors
Diffstat (limited to 'gn3/fs_helpers.py')
-rw-r--r--gn3/fs_helpers.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/gn3/fs_helpers.py b/gn3/fs_helpers.py
index e2f7ee2..73f6567 100644
--- a/gn3/fs_helpers.py
+++ b/gn3/fs_helpers.py
@@ -71,8 +71,9 @@ contents to TARGET_DIR/<dir-hash>.
os.mkdir(os.path.join(target_dir, token))
gzipped_file.save(tar_target_loc)
# Extract to "tar_target_loc/token"
- with tarfile.open(tar_target_loc) as tar:
- tar.extractall(path=os.path.join(target_dir, token))
+ tar = tarfile.open(tar_target_loc)
+ tar.extractall(path=os.path.join(target_dir, token))
+ tar.close()
# pylint: disable=W0703
except Exception:
return {"status": 128, "error": "gzip failed to unpack file"}