Skip to content

Commit

Permalink
Proposed fix for #7 - basically supress the stderr output in the call…
Browse files Browse the repository at this point in the history
… the system_profiler
  • Loading branch information
Rich Smith committed Oct 5, 2017
1 parent 89f4312 commit 334c096
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion EFIgyLite_cli.py
Expand Up @@ -266,7 +266,8 @@ def gather_system_versions(self):
self.message("Enumerated system informaton (This data will be sent to the API in order to determine your correct EFI version): ")

##Get Mac model ID, EFI & SMC ROM versions
sp_xml = Popen(["system_profiler", "-xml", "SPHardwareDataType"], stdout=PIPE).communicate()[0]
devnull = open(os.devnull, 'wb')
sp_xml = Popen(["system_profiler", "-xml", "SPHardwareDataType"], stdout=PIPE, stderr=devnull).communicate()[0]
self.hw_version = readPlistFromString(sp_xml)[0]["_items"][0]["machine_model"]
self.rom_version = readPlistFromString(sp_xml)[0]["_items"][0]["boot_rom_version"]
self.smc_version = readPlistFromString(sp_xml)[0]["_items"][0]['SMC_version_system']
Expand Down

0 comments on commit 334c096

Please sign in to comment.