Skip to content

Commit aa690ff

Browse files
committed
Fixed logic when parsing MachineConfig for rsync URL
1 parent 67cc036 commit aa690ff

File tree

1 file changed

+5
-1
lines changed
  • src/murfey/instrument_server

1 file changed

+5
-1
lines changed

src/murfey/instrument_server/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,11 @@ def upload_gain_reference(
351351
)
352352

353353
# Return the rsync URL if set, otherwise assume you are syncing via Murfey
354-
rsync_url = urlparse(str(machine_config.get("rsync_url", _get_murfey_url())))
354+
rsync_url = urlparse(
355+
str(machine_config["rsync_url"])
356+
if machine_config.get("rsync_url", "")
357+
else _get_murfey_url()
358+
)
355359
rsync_module = machine_config.get("rsync_module", "data")
356360
rsync_path = f"{rsync_url.hostname}::{rsync_module}/{safe_visit_path}/{safe_destination_dir}/{secure_filename(gain_reference.gain_path.name)}"
357361

0 commit comments

Comments
 (0)