Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make get beamline name return unchanged beamline #66

Merged
merged 2 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dodal/i03.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from dodal.log import set_beamline
from dodal.utils import BeamlinePrefix, get_beamline_name, skip_device

BL = get_beamline_name("i03")
BL = get_beamline_name("s03")
set_beamline(BL)


Expand Down
8 changes: 2 additions & 6 deletions src/dodal/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,8 @@
T = TypeVar("T")


def get_beamline_name(ixx: str) -> str:
bl = environ.get("BEAMLINE")
if bl is None:
return f"s{ixx[1:]}"
else:
return bl
def get_beamline_name(default: str) -> str:
return environ.get("BEAMLINE") or default


def get_hostname() -> str:
Expand Down