Removed amazon s3 signature from pypo cache file name.

Stopped pyppo from downloading amazon s3 files if it already exists in the pypo cache dir.
This commit is contained in:
drigato 2014-10-22 14:17:44 -04:00
parent f775bedb49
commit 9726fb80d2
5 changed files with 45 additions and 22 deletions

View file

@ -28,8 +28,11 @@ class CloudStorageDownloader:
except ObjectDoesNotExistError:
logging.info("Could not find object: %s" % obj_name)
logging.info('Downloading: %s to %s' % (cloud_obj.name, dst))
cloud_obj.download(destination_path=dst)
if os.path.isfile(dst) == False:
logging.info('Downloading: %s to %s' % (cloud_obj.name, dst))
cloud_obj.download(destination_path=dst)
else:
logging.info("Skipping download because %s already exists" % dst)
def read_config_file(self, config_path):
"""Parse the application's config file located at config_path."""