SpectraLogic / ds3_python_sdk

Apache License 2.0
8 stars 7 forks source link

Change in PutBulkJobSpectraS3Request perhaps confusing #141

Open thattommyhall opened 5 years ago

thattommyhall commented 5 years ago

Looking at (in v5):

class PutBulkJobSpectraS3Request(AbstractRequest):

    def __init__(self, bucket_name, object_list, aggregating=None, force=None, ignore_naming_conflicts=None, implicit_job_id_resolution=None, max_upload_size=None, minimize_spanning_across_media=None, name=None, priority=None, verify_after_write=None):
        super(PutBulkJobSpectraS3Request, self).__init__()
        self.bucket_name = bucket_name
        self.query_params['operation'] = 'start_bulk_put'
        if object_list is not None:
            if not (isinstance(cur_obj, Ds3PutObject) for cur_obj in object_list):
                raise TypeError('PutBulkJobSpectraS3Request should have request payload of type: list of Ds3PutObject')

The old version used to expect a FileObjectList, now it expects a python list of Ds3PutObject. I had passed a Ds3PutObjectList but then in does not work so I didnt see the type error.

I think you should check its a list first?