Merge pull request #1280 from YunoHost/ci-format-dev

[CI] Format code
This commit is contained in:
Alexandre Aubin 2021-08-08 18:53:37 +02:00 committed by GitHub
commit e5732aca84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -399,12 +399,12 @@ def firewall_upnp(action="status", no_refresh=False):
for protocol in ["TCP", "UDP"]:
if protocol + "_TO_CLOSE" in firewall["uPnP"]:
for port in firewall["uPnP"][protocol + "_TO_CLOSE"]:
if not isinstance(port, int):
# FIXME : how should we handle port ranges ?
logger.warning("Can't use UPnP to close '%s'" % port)
continue
# Clean the mapping of this port
if upnpc.getspecificportmapping(port, protocol):
try:
@ -414,12 +414,12 @@ def firewall_upnp(action="status", no_refresh=False):
firewall["uPnP"][protocol + "_TO_CLOSE"] = []
for port in firewall["uPnP"][protocol]:
if not isinstance(port, int):
# FIXME : how should we handle port ranges ?
logger.warning("Can't use UPnP to open '%s'" % port)
continue
# Clean the mapping of this port
if upnpc.getspecificportmapping(port, protocol):
try: