diff --git a/panic/widgets.py b/panic/widgets.py index 8ed4a352..d7587ca6 100644 --- a/panic/widgets.py +++ b/panic/widgets.py @@ -111,10 +111,7 @@ def setModel(self,model): def updateStyle(self,extra=''): self.setAlignment(QtCore.Qt.AlignCenter) - if hasattr(self, 'alarm'): - obj = self.alarm - else: - obj = {} + obj = getattr(self,'alarm',None) #print('AlarmValueLabel.updateStyle(%s,%s)'%(type(obj),obj)) if hasattr(obj,'active'): value = obj.active