mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-24 03:50:14 +10:00
Clean up macserial invocation
This commit is contained in:
@@ -288,7 +288,7 @@ class BuildSMBIOS:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
if self.constants.custom_serial_number == "" or self.constants.custom_board_serial_number == "":
|
if self.constants.custom_serial_number == "" or self.constants.custom_board_serial_number == "":
|
||||||
macserial_output = subprocess.run([self.constants.macserial_path] + f"-g -m {self.spoofed_model} -n 1".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
macserial_output = subprocess.run([self.constants.macserial_path, "--generate", "--model", self.spoofed_model, "--num", "1"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
macserial_output = macserial_output.stdout.decode().strip().split(" | ")
|
macserial_output = macserial_output.stdout.decode().strip().split(" | ")
|
||||||
sn = macserial_output[0]
|
sn = macserial_output[0]
|
||||||
mlb = macserial_output[1]
|
mlb = macserial_output[1]
|
||||||
|
|||||||
@@ -1152,7 +1152,7 @@ Hardware Information:
|
|||||||
if dlg.ShowModal() != wx.ID_YES:
|
if dlg.ShowModal() != wx.ID_YES:
|
||||||
return
|
return
|
||||||
|
|
||||||
macserial_output = subprocess.run([self.constants.macserial_path] + f"-g -m {self.constants.custom_model or self.constants.computer.real_model} -n 1".split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
macserial_output = subprocess.run([self.constants.macserial_path, "--generate", "--model", self.constants.custom_model or self.constants.computer.real_model, "--num", "1"], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
macserial_output = macserial_output.stdout.decode().strip().split(" | ")
|
macserial_output = macserial_output.stdout.decode().strip().split(" | ")
|
||||||
if len(macserial_output) == 2:
|
if len(macserial_output) == 2:
|
||||||
self.custom_serial_number_textbox.SetValue(macserial_output[0])
|
self.custom_serial_number_textbox.SetValue(macserial_output[0])
|
||||||
|
|||||||
Reference in New Issue
Block a user