aboutsummaryrefslogtreecommitdiffstats
path: root/src/bus.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/bus.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bus.py b/src/bus.py
index 5502500..91ea5da 100644
--- a/src/bus.py
+++ b/src/bus.py
@@ -120,7 +120,10 @@ class Bus:
'''
Close the bus
'''
- from native_bus import bus_close_wrapped, bus_deallocate
+ try:
+ from native_bus import bus_close_wrapped, bus_deallocate
+ except:
+ return
if self.bus is not None:
if bus_close_wrapped(self.bus) == -1:
raise self.__oserror()
@@ -153,6 +156,7 @@ class Bus:
0: stop listening
1: continue listening
-1: an error has occurred
+ NB! The received message will not be decoded from UTF-8
@param user_data See description of `callback`
'''
from native_bus import bus_read_wrapped