mirror of
https://github.com/dortania/OpenCore-Legacy-Patcher.git
synced 2026-04-13 20:28:21 +10:00
Fix more IORegistry issues
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# OpenCore Legacy Patcher changelog
|
||||
|
||||
## 0.2.3
|
||||
|
||||
- Fix more IORegistry issues
|
||||
|
||||
## 0.2.2
|
||||
|
||||
- Fix IORegistry issue
|
||||
|
||||
@@ -6,7 +6,6 @@ import tempfile
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import Generator
|
||||
from xml.parsers.expat import ExpatError
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -23,7 +22,7 @@ class IOReg:
|
||||
def __init__(self):
|
||||
try:
|
||||
self.ioreg = plistlib.loads(subprocess.run("ioreg -a -l".split(), stdout=subprocess.PIPE).stdout.strip())
|
||||
except ExpatError:
|
||||
except Exception:
|
||||
fd, file_path = tempfile.mkstemp(suffix=".plist")
|
||||
with open(fd, "wb") as file_obj:
|
||||
file_obj.write(subprocess.run("ioreg -a -l".split(), stdout=subprocess.PIPE).stdout.strip())
|
||||
|
||||
Reference in New Issue
Block a user