From 9f72be39536ca121b61be32b8d2b168d970327f9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 22 Apr 2015 05:35:28 +0200 Subject: add destructor for bus class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/bus.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- cgit v1.2.3-70-g09d2