Formatting

This commit is contained in:
shortcutme 2019-11-27 03:02:18 +01:00
parent 97ecb7e3aa
commit 8b6f221e22
No known key found for this signature in database
GPG Key ID: 5B63BAE6CB9613AE
1 changed files with 3 additions and 1 deletions

View File

@ -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)