def __init__(self, directory, bucket, access_key_id, secret_access_key, force=False):
        if '.' in bucket:
            connection = S3Connection(access_key_id, secret_access_key, calling_format=OrdinaryCallingFormat())
        else:
            connection = S3Connection(access_key_id, secret_access_key)

        self.force = force
        self.bucket = bucket
        self.directory = directory.rstrip('/')

        try:
            self.connection = connection.get_bucket(bucket.root)
        except S3ResponseError, e:
            show_error("S3 error! See below:\n")
            puts("{0}\n".format(str(e)))
            sys.exit()
dataset/ETHPy150Open tarbell-project/tarbell/tarbell/s3.py/S3Sync.__init__/original