mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2025-07-13 12:11:51 +02:00
refactor: moved bec_scaninfo_mixin to ophyd_devices/utils
This commit is contained in:
@ -11,7 +11,7 @@ from ophyd.pseudopos import (
|
|||||||
)
|
)
|
||||||
from ophyd.device import Staged
|
from ophyd.device import Staged
|
||||||
|
|
||||||
from ophyd_devices.epics.devices.bec_scaninfo_mixin import BecScaninfoMixin
|
from ophyd_devices.utils.bec_scaninfo_mixin import BecScaninfoMixin
|
||||||
from ophyd_devices.utils import bec_utils
|
from ophyd_devices.utils import bec_utils
|
||||||
|
|
||||||
from bec_lib import bec_logger
|
from bec_lib import bec_logger
|
||||||
|
@ -6,7 +6,7 @@ from bec_lib.device import DeviceStatus
|
|||||||
from bec_lib.file_utils import FileWriterMixin
|
from bec_lib.file_utils import FileWriterMixin
|
||||||
from ophyd import Device
|
from ophyd import Device
|
||||||
from ophyd.device import Staged
|
from ophyd.device import Staged
|
||||||
from ophyd_devices.epics.devices.bec_scaninfo_mixin import BecScaninfoMixin
|
from ophyd_devices.utils.bec_scaninfo_mixin import BecScaninfoMixin
|
||||||
from ophyd_devices.utils import bec_utils
|
from ophyd_devices.utils import bec_utils
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,7 +103,10 @@ class BecScaninfoMixin:
|
|||||||
def get_username(self) -> str:
|
def get_username(self) -> str:
|
||||||
"""Get username"""
|
"""Get username"""
|
||||||
if not self.sim_mode:
|
if not self.sim_mode:
|
||||||
return self.device_manager.producer.get(MessageEndpoints.account()).decode()
|
msg = self.device_manager.producer.get(MessageEndpoints.account())
|
||||||
|
if not isinstance(msg, str):
|
||||||
|
return os.getlogin()
|
||||||
|
return self.device_manager.producer.get(MessageEndpoints.account())
|
||||||
return os.getlogin()
|
return os.getlogin()
|
||||||
|
|
||||||
def load_scan_metadata(self) -> None:
|
def load_scan_metadata(self) -> None:
|
Reference in New Issue
Block a user