Commit 2bf96bc2 authored by Jerome Carnis's avatar Jerome Carnis 🦊
Browse files

deviceEigerP11.py: add check for session being None before accessing its attributes

parent efaacfe7
...@@ -352,6 +352,8 @@ class EigerScanner(DeviceScanner): ...@@ -352,6 +352,8 @@ class EigerScanner(DeviceScanner):
return scanner_input return scanner_input
def _init_new_scan(self, scanner_input, scanner_attributes, parent_macro) -> None: def _init_new_scan(self, scanner_input, scanner_attributes, parent_macro) -> None:
if kamzik3.session is None:
raise DeviceError("kamzik session is None, can't get the scan number")
self.logger.info( self.logger.info(
"Initiating new scan number {}".format( "Initiating new scan number {}".format(
kamzik3.session.get_value(ATTR_SCAN_COUNT) kamzik3.session.get_value(ATTR_SCAN_COUNT)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment