pytec: narrow down exception catching range
This commit is contained in:
parent
bfcb91d2c0
commit
9e215830aa
@ -246,18 +246,19 @@ def main():
|
||||
try:
|
||||
ch = data[channel]
|
||||
|
||||
temperature = ch['temperature']
|
||||
|
||||
if (tuner.run(temperature, ch['time'])):
|
||||
break
|
||||
|
||||
tuner_out = tuner.output()
|
||||
|
||||
tec.set_param("pwm", channel, "i_set", tuner_out)
|
||||
|
||||
# Sometimes report_mode may yeild empty object
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
temperature = ch['temperature']
|
||||
|
||||
if (tuner.run(temperature, ch['time'])):
|
||||
break
|
||||
|
||||
tuner_out = tuner.output()
|
||||
|
||||
tec.set_param("pwm", channel, "i_set", tuner_out)
|
||||
|
||||
tec.set_param("pwm", channel, "i_set", 0)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user