From b46e55d3f6a5e8835060586297f21c25beab43b2 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Sat, 30 Dec 2023 13:14:47 -0700 Subject: [PATCH] Clean up macserial invocation --- resources/build/smbios.py | 2 +- resources/wx_gui/gui_settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/build/smbios.py b/resources/build/smbios.py index 296083487..ce527505d 100644 --- a/resources/build/smbios.py +++ b/resources/build/smbios.py @@ -288,7 +288,7 @@ class BuildSMBIOS: """ 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] diff --git a/resources/wx_gui/gui_settings.py b/resources/wx_gui/gui_settings.py index 34a9fcc06..74677d3f8 100644 --- a/resources/wx_gui/gui_settings.py +++ b/resources/wx_gui/gui_settings.py @@ -1152,7 +1152,7 @@ Hardware Information: 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])