(self, arg="")
| 1199 | return check_command("route") |
| 1200 | |
| 1201 | def get(self, arg=""): # type: (str) -> Optional[str] |
| 1202 | output = _popen("route", "-n") |
| 1203 | |
| 1204 | try: |
| 1205 | return output.partition("0.0.0.0")[2].partition("\n")[0].split()[-1] |
| 1206 | except IndexError as ex: # index errors means no default route in output? |
| 1207 | log.debug("DefaultIfaceRouteCommand failed for %s: %s", arg, str(ex)) |
| 1208 | return None |
| 1209 | |
| 1210 | |
| 1211 | class DefaultIfaceRouteGetCommand(Method): |