piCamBot.py 文件源码

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

项目:piCamBot 作者: scaidermern 项目源码 文件源码
def signalHandler(self, signal, frame):
        # always disable buzzer
        if self.config['buzzer']['enable']:
            gpio = self.config['buzzer']['gpio']
            self.GPIO.output(gpio, 0)
            self.GPIO.cleanup()

        msg = 'Caught signal %d, terminating now.' % signal
        self.logger.error(msg)
        for owner_id in self.config['telegram']['owner_ids']:
            try:
                self.bot.sendMessage(chat_id=owner_id, text=msg)
            except Exception as e:
                pass
        sys.exit(1)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号