diff options
author | Mattias Andrée <maandree@operamail.com> | 2015-04-23 05:06:08 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2015-04-23 05:06:08 +0200 |
commit | 69b62ab9e9fbb57f47f9f0bb3cbaab1b6d0f3087 (patch) | |
tree | aec14cec2dcb02354878ab3809d279a140248b8b /src/bus.py | |
parent | fix some errors (diff) | |
download | python-bus-1.0.tar.gz python-bus-1.0.tar.bz2 python-bus-1.0.tar.xz |
suppress error on exit and fix callback1.0
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/bus.py')
-rw-r--r-- | src/bus.py | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |