From 8b6f221e22d6037b2757202ede0aaf0e7a11981e Mon Sep 17 00:00:00 2001 From: shortcutme Date: Wed, 27 Nov 2019 03:02:18 +0100 Subject: [PATCH] Formatting --- src/util/UpnpPunch.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/UpnpPunch.py b/src/util/UpnpPunch.py index 4b02717a..48b497b6 100644 --- a/src/util/UpnpPunch.py +++ b/src/util/UpnpPunch.py @@ -17,7 +17,6 @@ import gevent logger = logging.getLogger("Upnp") - class UpnpError(Exception): pass @@ -174,6 +173,7 @@ def _get_local_ips(): # Delete duplicates local_ips = list(set(local_ips)) + # Probably we looking for an ip starting with 192 local_ips = sorted(local_ips, key=lambda a: a.startswith("192"), reverse=True) @@ -388,6 +388,8 @@ if __name__ == "__main__": print("Success:", ask_to_open_port(15443, "ZeroNet", protos=["TCP"])) print("Done in", time.time() - s) + print("Closing port...") print("Success:", ask_to_close_port(15443, "ZeroNet", protos=["TCP"])) print("Done in", time.time() - s) +