INNER CODE UNIT · Python

disconnect

bkbilly/lnxlink · lnxlink/__main__.py:351

    def disconnect(self, *args):
        """Service has stopped"""
        self.kill = True
        self.mqtt.disconnect()
        self.stop_event.set()
        self.publ_queue.notify_all()

    def replace_values_with_none(self, data):
        """Replaces specified values with None recursively"""
        if isinstance(data, bytes):
            try:
                data = data.decode("utf-8")
            except Exception:
                data = None
        if isinstance(data, str):
            try:
                parsed = json.loads(data)
                if isinstance(parsed, (dict, list)):

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…