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 Original line Diff line number Diff line
@@ -65,9 +65,16 @@ class Scope:
            except:
            except:
                return x
                return x


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

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




@dataclass_json
@dataclass_json