From 820fa6ac7a8436c4530e43cb8395cbc87e5fa58f Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Fri, 30 Oct 2020 09:57:05 +0200 Subject: [PATCH] Refactor (readability) --- trains/storage/manager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/trains/storage/manager.py b/trains/storage/manager.py index ebfdd93e..32e9b6f3 100644 --- a/trains/storage/manager.py +++ b/trains/storage/manager.py @@ -41,9 +41,10 @@ class StorageManager(object): cached_file = CacheManager.get_cache_manager( cache_context=cache_context ).get_local_copy(remote_url=remote_url, force_download=force_download) - if not extract_archive or not cached_file: - return cached_file - return cls._extract_to_cache(cached_file, name) + if extract_archive and cached_file: + return cls._extract_to_cache(cached_file, name) + + return cached_file @classmethod def upload_file(