Fix more IORegistry issues

This commit is contained in:
Dhinak G
2021-06-24 09:06:31 -04:00
parent 86ffb83c86
commit 2e3152f23b
2 changed files with 5 additions and 2 deletions

View File

@@ -1,5 +1,9 @@
# OpenCore Legacy Patcher changelog
## 0.2.3
- Fix more IORegistry issues
## 0.2.2
- Fix IORegistry issue

View File

@@ -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())