File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed
Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff 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 ]
You can’t perform that action at this time.
0 commit comments