diff options
author | nicolargo <nicolas@nicolargo.com> | 2021-06-20 08:44:31 +0200 |
---|---|---|
committer | nicolargo <nicolas@nicolargo.com> | 2021-06-20 08:44:31 +0200 |
commit | 26ce4e5d4814d3e5acda26d31150bd554ad61e13 (patch) | |
tree | 53b64b05cd4d5ded4bda12da9a5cca4a9d1773b9 /glances/autodiscover.py | |
parent | 4873f06387f8f803dba58c31567313ce72758160 (diff) |
Change except in Zeroconf
Diffstat (limited to 'glances/autodiscover.py')
-rw-r--r-- | glances/autodiscover.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/glances/autodiscover.py b/glances/autodiscover.py index bf77bd61..1433ea1b 100644 --- a/glances/autodiscover.py +++ b/glances/autodiscover.py @@ -226,9 +226,9 @@ class GlancesAutoDiscoverClient(object): # address (only one address) is replaced by addresses (list of addresses) self.info = ServiceInfo( zeroconf_type, - '{}:{}.{}'.format(hostname, - args.port, - zeroconf_type), + name = '{}:{}.{}'.format(hostname, + args.port, + zeroconf_type), addresses=[socket.inet_pton(address_family, zeroconf_bind_address)], port=args.port, weight=0, @@ -237,7 +237,7 @@ class GlancesAutoDiscoverClient(object): server=hostname) try: self.zeroconf.register_service(self.info) - except socket.error as e: + except Exception as e: logger.error("Error while announcing Glances server: {}".format(e)) else: print("Announce the Glances server on the LAN (using {} IP address)".format(zeroconf_bind_address)) |