Skip to content

Commit

Permalink
Clean up macserial invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
khronokernel committed Dec 30, 2023
1 parent 62fd543 commit b46e55d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/build/smbios.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ def _advanced_serial_patch(self) -> None:
"""

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(" | ")
sn = macserial_output[0]
mlb = macserial_output[1]
Expand Down
2 changes: 1 addition & 1 deletion resources/wx_gui/gui_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ def on_generate_serial_number(self, event: wx.Event) -> None:
if dlg.ShowModal() != wx.ID_YES:
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(" | ")
if len(macserial_output) == 2:
self.custom_serial_number_textbox.SetValue(macserial_output[0])
Expand Down

0 comments on commit b46e55d

Please sign in to comment.