Skip to content

Commit ad5004d

Browse files
committed
Add temp workaround to macserial issue
1 parent fff9c4b commit ad5004d

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

Resources/BuildOpenCore.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,16 +283,20 @@ def BuildSMBIOS():
283283
new_model
284284
)
285285

286-
# Patch Number Serial
287-
Versions.plist_data = Versions.plist_data.replace(
288-
"W00000000001",
289-
serialData[0]
290-
)
291-
# Patch MLB
292-
Versions.plist_data = Versions.plist_data.replace(
293-
"M0000000000000001",
294-
serialData[1]
295-
)
286+
if serialData == "['']":
287+
# Used as a backup for when macserial fails
288+
print("Failed to load macserial")
289+
else:
290+
# Patch Number Serial
291+
Versions.plist_data = Versions.plist_data.replace(
292+
"W00000000001",
293+
serialData[0]
294+
)
295+
# Patch MLB
296+
Versions.plist_data = Versions.plist_data.replace(
297+
"M0000000000000001",
298+
serialData[1]
299+
)
296300

297301
# Patch UUID
298302
uuidGen = subprocess.Popen(["uuidgen"], stdout=subprocess.PIPE).communicate()[0]

0 commit comments

Comments
 (0)