MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / get

Method get

pager_lib/getmac/getmac.py:939–949  ·  view source on GitHub ↗
(self, arg)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

_popenFunction · 0.85
_parse_ifconfigFunction · 0.85

Tested by

no test coverage detected