

def modified_time(self, name, force_check=False):
    name = self._path(name)
    if (self.cache and (not force_check)):
        last_modified = self.cache.modified_time(name)
        if last_modified:
            return datetime.fromtimestamp(last_modified)
    response = self.connection._make_request('HEAD', self.bucket, name)
    if (response.status == 404):
        raise S3Error(("Cannot find the file specified: '%s'" % name))
    last_modified = timegm(parsedate(response.getheader('Last-Modified')))
    if self.cache:
        self._store_in_cache(name, response)
    return datetime.fromtimestamp(last_modified)

dataset/ETHPy150Open kylemacfarlane/django-cb-storage-s3/src/cuddlybuddly/storage/s3/storage.py S3Storage.modified_time/original