diff --git a/pymods/irods_utils/irods_utils.py b/pymods/irods_utils/irods_utils.py index 73ecb3f6f78afe63680676e228896cd42b8df76e..b565369df744898e83596f5f7b10bdeb2fd1651f 100644 --- a/pymods/irods_utils/irods_utils.py +++ b/pymods/irods_utils/irods_utils.py @@ -429,7 +429,8 @@ def confirmed_put( irods_sesh, file_pathname, new_obj_ipath, metadata_dict=None, existing_obj = None try: - existing_obj = irods_sesh.data_objects.get( new_obj_ipath ) + options = {kw.VERIFY_CHKSUM_KW: ''} + existing_obj = irods_sesh.data_objects.get( new_obj_ipath, **options ) logging.debug( "Object aleady exists at ipath: " + new_obj_ipath ) except irods_ex.DataObjectDoesNotExist: logging.debug( "DataObjectDoesNotExist " + new_obj_ipath ) @@ -444,14 +445,14 @@ def confirmed_put( irods_sesh, file_pathname, new_obj_ipath, metadata_dict=None, if existing_obj != None: # https://github.com/irods/python-irodsclient/blob/main/irods/test/collection_test.py#L317 - # file_digest = helpers.compute_sha256_digest( file_pathname ) + #file_digest = helpers.compute_sha256_digest( file_pathname ) - # logging.error( "irods checksum: " + str( existing_obj.checksum ) + " new_obj_hash_256 " + str( new_obj_hash_256 ) + " file_digest " + str( file_digest ) ) + #logging.error( "irods checksum: " + str( existing_obj.chksum() ) + " new_obj_hash_256 " + str( new_obj_hash_256 ) + " file_digest " + str( file_digest ) ) - if existing_obj.checksum != new_obj_hash_256 : + if existing_obj.chksum() != new_obj_hash_256 : mismatch = True mismatch_reason = "data csm" - logging.debug( "Object prexists but data mismatches." + logging.debug( "Object pre-exists but data mismatches." + " file_pathname " + file_pathname ) else: # Get the existing objects metadata as a python dict