Skip to content

Commit

Permalink
Update to changed PRC API
Browse files Browse the repository at this point in the history
  • Loading branch information
qubixes committed Jul 2, 2024
1 parent e3e9ecc commit d652e20
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ibridges/data_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def _obj_put(
options[kw.RESC_NAME_KW] = resc_name
if overwrite or not obj_exists:
try:
session.irods_session.data_objects.put(local_path, str(irods_path), pbar=pbar,
session.irods_session.data_objects.put(local_path, str(irods_path),
updatables=[pbar.update],
**options)
except (PermissionError, OSError) as error:
err_msg = f"Cannot read {error.filename}."
Expand Down Expand Up @@ -245,7 +246,8 @@ def _obj_get(
local_path = Path(local_path).joinpath(irods_path.name)

try:
session.irods_session.data_objects.get(str(irods_path), local_path, pbar=pbar, **options)
session.irods_session.data_objects.get(str(irods_path), local_path,
updatables=[pbar.update], **options)
except (OSError, irods.exception.CAT_NO_ACCESS_PERMISSION) as error:
msg = f"Cannot write to {local_path}."
if not ignore_err:
Expand Down

0 comments on commit d652e20

Please sign in to comment.