def BJregisterService(protocol, port): try: from Plugins.Extensions.Bonjour.Bonjour import bonjour service = bonjour.buildService(protocol, port, 'OpenWebif') bonjour.registerService(service, True) except: # nosec pass try: servicetype = '_' + protocol + '._tcp' enigma.e2avahi_announce(None, servicetype, port) except: # nosec pass