bluez_peripheral.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:senic-hub 作者: getsenic 项目源码 文件源码
def run(self):
        """
        Registers advertisement and services to D-Bus and starts the main loop.
        """
        if self._main_loop:
            return
        self._main_loop = GObject.MainLoop()
        self._disconnect_all()
        self._register()
        logger.info("--- Mainloop started ---")
        try:
            self._main_loop.run()
        except KeyboardInterrupt:
            # ignore exception as it is a valid way to exit the program
            # and skip to finally clause
            pass
        except Exception as e:
            logger.error(e)
        finally:
            logger.info("--- Mainloop finished ---")
            self._unregister()
            self._main_loop.quit()
            self._main_loop = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号