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