Skip to content
This repository has been archived by the owner on Nov 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #48 from hoechenberger/gusto
Browse files Browse the repository at this point in the history
NF: Implement __del__() method for Gustometer
  • Loading branch information
hoechenberger committed Oct 12, 2015
2 parents 14a329b + d31af42 commit e639f50
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pphelper/hardware.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,13 @@ def __init__(self, pulse_duration=0.1, pause_duration=0.2,
self._socket_receive.settimeout(0.1)
self._connect()

def __del__(self):
self._ni_trigger_in_task.clear()
self._ni_trigger_out_task.clear()
self._socket_receive.close()
self._socket_send.close()
del self

def _send(self, message):
self._socket_send.sendto(message, (self._gusto_ip,
self._gusto_port))
Expand Down

0 comments on commit e639f50

Please sign in to comment.