File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,10 @@ Development
55^^^^^^^^^^^
66
77Enhancements:
8- - Reworked documentation and docstrings.
8+ - Rework documentation and docstrings.
99
10+ Fixes:
11+ - Call ``InputDevice.close() `` in ``InputDevice.__del__() ``.
1012
11130.4.1 (Jul 24, 2013)
1214^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -110,6 +110,10 @@ def __init__(self, dev):
110110 #: The raw dictionary of device capabilities - see `:func:capabilities()`.
111111 self ._rawcapabilities = _input .ioctl_capabilities (self .fd )
112112
113+ def __del__ (self ):
114+ if hasattr (self , 'fd' ) and self .fd != None :
115+ self .close ()
116+
113117 def _capabilities (self , absinfo = True ):
114118 res = {}
115119 for etype , ecodes in self ._rawcapabilities .items ():
You can’t perform that action at this time.
0 commit comments