Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
qubixes committed Feb 13, 2025
1 parent f0b71d9 commit 25c2549
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ibridges/data_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,9 +499,14 @@ def _transfer_needed(source: Union[IrodsPath, Path],
dest: Union[IrodsPath, Path],
overwrite: bool, ignore_err: bool):
if isinstance(source, IrodsPath):
# Ensure that if the source is remote, the dest should be local.
if not isinstance(dest, Path):
raise ValueError("Internal error: source and destination should be local/remote.")
ipath = source
lpath = dest
else:
if not isinstance(dest, IrodsPath):
raise ValueError("Internal error: source and destination should be local/remote.")
ipath = dest
lpath = source

Expand Down

0 comments on commit 25c2549

Please sign in to comment.