(self, arg)
| 937 | return check_command("ifconfig") |
| 938 | |
| 939 | def get(self, arg): # type: (str) -> Optional[str] |
| 940 | try: |
| 941 | command_output = _popen("ifconfig", arg) |
| 942 | except CalledProcessError as err: |
| 943 | # Return code of 1 means interface doesn't exist |
| 944 | if err.returncode == 1: |
| 945 | return None |
| 946 | else: |
| 947 | raise err # this will cause another method to be used |
| 948 | |
| 949 | return _parse_ifconfig(arg, command_output) |
| 950 | |
| 951 | |
| 952 | # TODO: combine this with IfconfigWithArg/IfconfigNoArg |
nothing calls this directly
no test coverage detected