(self, arg="")
| 1216 | return check_command("route") |
| 1217 | |
| 1218 | def get(self, arg=""): # type: (str) -> Optional[str] |
| 1219 | output = _popen("route", "get default") |
| 1220 | |
| 1221 | if not output: |
| 1222 | return None |
| 1223 | |
| 1224 | try: |
| 1225 | return output.partition("interface: ")[2].strip().split()[0].strip() |
| 1226 | except IndexError as ex: |
| 1227 | log.debug("DefaultIfaceRouteCommand failed for %s: %s", arg, str(ex)) |
| 1228 | return None |
| 1229 | |
| 1230 | |
| 1231 | class DefaultIfaceIpRoute(Method): |