(self)
| 47 | self.routes = read_routes() |
| 48 | |
| 49 | def __repr__(self): |
| 50 | # type: () -> str |
| 51 | rtlst = [] # type: List[Tuple[Union[str, List[str]], ...]] |
| 52 | for net, msk, gw, iface, addr, metric in self.routes: |
| 53 | if_repr = resolve_iface(iface).description |
| 54 | rtlst.append((ltoa(net), |
| 55 | ltoa(msk), |
| 56 | gw, |
| 57 | if_repr, |
| 58 | addr, |
| 59 | str(metric))) |
| 60 | |
| 61 | return pretty_list(rtlst, |
| 62 | [("Network", "Netmask", "Gateway", "Iface", "Output IP", "Metric")]) # noqa: E501 |
| 63 | |
| 64 | def make_route(self, |
| 65 | host=None, # type: Optional[str] |
nothing calls this directly
no test coverage detected