From b7779cf363e7746ca9b353910f6e51c006e6451c Mon Sep 17 00:00:00 2001 From: Victor Date: Thu, 22 Mar 2018 11:23:06 -0600 Subject: [PATCH] MAINT: general bug fix for existing path across OS --- catalyst/marketplace/marketplace.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/catalyst/marketplace/marketplace.py b/catalyst/marketplace/marketplace.py index 109369610..1ce9acc0f 100644 --- a/catalyst/marketplace/marketplace.py +++ b/catalyst/marketplace/marketplace.py @@ -430,12 +430,8 @@ def process_temp_bundle(self, ds_name, path): merge_bundles(zsource, ztarget) else: - try: - os.rename(tmp_bundle, bundle_folder) - except WindowsError: - shutil.rmtree(bundle_folder) - os.rename(tmp_bundle, bundle_folder) - pass + shutil.rmtree(bundle_folder, ignore_errors=True) + os.rename(tmp_bundle, bundle_folder) def ingest(self, ds_name=None, start=None, end=None, force_download=False): @@ -595,7 +591,6 @@ def clean(self, ds_name=None, data_frequency=None): folder = get_bundle_folder(ds_name, data_frequency) shutil.rmtree(folder) - pass def create_metadata(self, key, secret, ds_name, data_frequency, desc, has_history=True, has_live=True):