fix: crash on bec init failure; beamline must be set explicitly
CI / lint (push) Successful in 17s
CI / lint (pull_request) Successful in 22s
CI / test (3.11) (push) Failing after 20s
CI / test (3.13) (push) Failing after 22s
CI / test (3.12) (push) Failing after 28s
CI / test (3.13) (pull_request) Failing after 23s
CI / test (3.11) (pull_request) Failing after 27s
CI / test (3.12) (pull_request) Failing after 25s

This commit is contained in:
2026-07-08 11:44:30 +02:00
parent f482d1381f
commit 4ac9587abc
+6 -2
View File
@@ -29,9 +29,13 @@ class BeamlineYAMLConfig:
def mx_beamline() -> MXBeamline:
name = os.getenv("BEAMLINE")
if name is None:
return MXBeamline.SIMULATED
raise ValueError("Please set the BEAMLINE environment variable to run AareDAQ")
name = name.strip().upper()
return MXBeamline[name] if name in MXBeamline.__members__ else MXBeamline.SIMULATED
if name in MXBeamline.__members__:
return MXBeamline[name]
raise ValueError(
f"{name} is not a valid value for BEAMLINE. Please set one of {MXBeamline.__members__}"
)
def get_jfjoch_url(bl: MXBeamline) -> str: