aboutsummaryrefslogtreecommitdiffstats
path: root/src/bus.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-04-22 05:35:28 +0200
committerMattias Andrée <maandree@operamail.com>2015-04-22 05:35:28 +0200
commit9f72be39536ca121b61be32b8d2b168d970327f9 (patch)
treede7fea02f2f677820510e6073c9824bed648ebc7 /src/bus.py
parent... (diff)
downloadpython-bus-9f72be39536ca121b61be32b8d2b168d970327f9.tar.gz
python-bus-9f72be39536ca121b61be32b8d2b168d970327f9.tar.bz2
python-bus-9f72be39536ca121b61be32b8d2b168d970327f9.tar.xz
add destructor for bus class
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/bus.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bus.py b/src/bus.py
index 267a435..62c0c37 100644
--- a/src/bus.py
+++ b/src/bus.py
@@ -66,6 +66,13 @@ class Bus:
self.bus = None
+ def __del__(self):
+ '''
+ Destructor
+ '''
+ self.close()
+
+
def create(self, flags : int = 0) -> str:
'''
Create the bus