Skip to content

Commit

Permalink
Merge pull request #66 from DiamondLightSource/artemis_661_fix_get_be…
Browse files Browse the repository at this point in the history
…amline_name

make get beamline name return unchanged beamline
  • Loading branch information
DominicOram committed May 22, 2023
2 parents 491bb53 + 756cd3d commit dcac18a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
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

0 comments on commit dcac18a

Please sign in to comment.