mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-05-14 12:05:36 +02:00
throw approperiate error when no modules added for powers
This commit is contained in:
@@ -75,6 +75,8 @@ class DetectorPowers:
|
||||
|
||||
@property
|
||||
def _powernames(self):
|
||||
if self._detector.size() == 0:
|
||||
raise RuntimeError("No modules added")
|
||||
# always get the latest list
|
||||
if hasattr(self._detector, 'powerlist'):
|
||||
return [n.replace(" ", "") for n in self._detector.powerlist]
|
||||
|
||||
Reference in New Issue
Block a user