Offering: openGaussDev

More detail: 

Match-id-20039fa1ded1bc58ea219f89bb28ca4e31890c9b
This commit is contained in:
openGaussDev 2022-03-08 16:35:28 +08:00 committed by yanghao
parent efc4559509
commit e2d527347a
1 changed files with 2 additions and 2 deletions

View File

@ -166,10 +166,10 @@ class Knob:
return
self._scale = self._max - self._min
if self._scale < 0:
if self._scale <= 0:
raise ValueError('Knob %s is incorrectly configured. '
'The max value must be greater than '
'or equal to the min value.' % self.name)
'the min value.' % self.name)
if type(self.user_set) is str:
self.current = self.to_numeric(self.user_set)
elif type(self.user_set) in (int, float):