Commit ab483041 authored by Ondřej Borýsek's avatar Ondřej Borýsek
Browse files

Make IP sorting fail softly

parent c4909c88
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -65,9 +65,16 @@ class Scope:
            except:
                return x

        self.hosts.sort(key=lambda x: try_to_get_ip(x.ip))
        try:
            self.hosts.sort(key=lambda x: try_to_get_ip(x.ip))
        except:
            logger.warning("Sorting by IPs failed.")

        for host in self.hosts:
            host.sort()
            try:
                host.sort()
            except:
                logger.warning("Sorting by ports failed")


@dataclass_json