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