INNER CODE UNIT · Python

add_service

xoseperez/espurna · code/ota.py:94

    def add_service(self, browser, service_type, name):
        """
        Callback that adds discovered devices to "devices" list
        """

        info = None
        tries = 0
        while info is None and tries < 4:
            try:
                info = browser.get_service_info(service_type, name)
            except IOError:
                break
            tries += 1

        if not info:
            print(
                "! error getting service info {} {}".format(service_type, name),
                file=sys.stderr,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…