Open avkrishnamurthy opened 1 year ago
I believe this snippet of code in sync_data_from_file
in sync_irods.py is the only entrypoint into the sync_file
function, so it should not be possible for op to be none.
I think the idea of setting op=Operation.REGISTER_SYNC
if it was none in sync_file
comes from the snippet below which is also in sync_data_from_file
, but the code should never be able to reach sync_file
with op=Operation.REGISTER_SYNC
anyway, so I think it can safely be removed in sync_file
.
Currently in
sync_file
, when the operation is none, it sets the operation to beREGISTER_SYNC
. However,sync_file
should only be run for operationsPUT_SYNC
andPUT_APPEND
. More investigation is needed to decide what the behavior should be if we reachsync_file
with no operation.