| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 4744427 commit 4da1612
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,6 @@ | |||
| 7 | 7 | ||
| 8 | 8 | import argparse | |
| 9 | 9 | import logging | |
| 10 | - import socket | ||
| 11 | 10 | from time import sleep | |
| 12 | 11 | from typing import cast | |
| 13 | 12 | ||
@@ -23,7 +22,7 @@ def on_service_state_change( | |||
| 23 | 22 | info = zeroconf.get_service_info(service_type, name) | |
| 24 | 23 | print("Info from zeroconf.get_service_info: %r" % (info)) | |
| 25 | 24 | if info: | |
| 26 | - addresses = ["%s:%d" % (socket.inet_ntoa(addr), cast(int, info.port)) for addr in info.addresses] | ||
| 25 | + addresses = ["%s:%d" % (addr, cast(int, info.port)) for addr in info.parsed_addresses()] | ||
| 27 | 26 | print(" Addresses: %s" % ", ".join(addresses)) | |
| 28 | 27 | print(" Weight: %d, priority: %d" % (info.weight, info.priority)) | |
| 29 | 28 | print(" Server: %s" % (info.server,)) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments