hendiCtrl: fixed graceful close
This commit is contained in:
@@ -184,11 +184,7 @@ class HendiCtrl:
|
|||||||
return int(self.toWatts(self.getPowerDigits()) + 0.5)
|
return int(self.toWatts(self.getPowerDigits()) + 0.5)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
try:
|
self.remoteEnable(False)
|
||||||
self.setSwitch(0)
|
|
||||||
except Exception:
|
|
||||||
pass
|
|
||||||
self.ser.close()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Reference in New Issue
Block a user