MCPcopy
hub / github.com/corpnewt/GenSMBIOS / _list_current

Method _list_current

GenSMBIOS.py:423–443  ·  view source on GitHub ↗
(self, macserial)

Source from the content-addressed store, hash-verified

421 self.u.grab("Press [enter] to return...")
422
423 def _list_current(self, macserial):
424 if not macserial or not os.path.exists(macserial):
425 self.u.head("Missing MacSerial")
426 print("")
427 print("MacSerial binary not found.")
428 print("")
429 self.u.grab("Press [enter] to return...")
430 return
431 out, err, code = self.r.run({"args":[macserial]})
432 out = "\n".join([x for x in out.split("\n") if not x.lower().startswith("version") and len(x)])
433 self.u.head("Current SMBIOS Info")
434 print("")
435 if out:
436 print(out)
437 else:
438 print("Nothing was returned for the currently running system.")
439 if not sys.platform.lower() == "darwin":
440 print("\nGiven that macserial gathers its information from the IODeviceTree, this can")
441 print("only be done on macOS.")
442 print("")
443 self.u.grab("Press [enter] to return...")
444
445 def get_additional_args(self):
446 while True:

Callers 1

mainMethod · 0.95

Calls 3

headMethod · 0.80
grabMethod · 0.80
runMethod · 0.80

Tested by

no test coverage detected