(self, arg)
| 860 | return check_command("wmic.exe") |
| 861 | |
| 862 | def get(self, arg): # type: (str) -> Optional[str] |
| 863 | command_output = _popen( |
| 864 | "wmic.exe", |
| 865 | 'nic where "NetConnectionID = \'%s\'" get "MACAddress" /value' % arg, |
| 866 | ) |
| 867 | |
| 868 | # Negative: "No Instance(s) Available" |
| 869 | # Positive: "MACAddress=00:FF:E7:78:95:A0" |
| 870 | # NOTE: .partition() always returns 3 parts, |
| 871 | # therefore it won't cause an IndexError |
| 872 | return command_output.strip().partition("=")[2] |
| 873 | |
| 874 | |
| 875 | class DarwinNetworksetupIface(Method): |