def __getitem__(self, path):
    try:
        path = posixpath.join(self.path, path)
        resp = self.client.get_object(Bucket=self.bucket, Key=path)
        x = resp['Body'].read()
        return x
    except ClientError as err:
        if (err.response['Error']['Code'] == 'NoSuchKey'):
            raise KeyError(err)
        else:
            raise
    except Exception as err:
        logger.error(err)
        raise S3Exception(err)
def __getitem__(self, path):
    try:
        path = posixpath.join(self.path, path)
        resp = self.client.get_object(Bucket=self.bucket, Key=path)
        x = resp['Body'].read()
        return x
    except ClientError as err:
        if (err.response['Error']['Code'] == 'NoSuchKey'):
            raise KeyError(err)
        else:
            raise
    except Exception as err:
        logger.error(err)
        raise S3Exception(err)