Skip to content

Commit 0ed0479

Browse files
committed
osenum: Fix crash when fuOS file is missing
Signed-off-by: Hector Martin <[email protected]>
1 parent 2443fda commit 0ed0479

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/osenum.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,10 @@ def collect_os(self, part, volumes, vgid):
208208
osi.bp["nsih"],
209209
"System/Library/Caches/com.apple.kernelcaches",
210210
"kernelcache.custom." + coih)
211-
osi.m1n1_ver = m1n1.get_version(fuos_path)
212-
if osi.m1n1_ver:
213-
logging.info(f" m1n1 version found: {osi.m1n1_ver}")
211+
if os.path.exists(fuos_path):
212+
osi.m1n1_ver = m1n1.get_version(fuos_path)
213+
if osi.m1n1_ver:
214+
logging.info(f" m1n1 version found: {osi.m1n1_ver}")
214215

215216
if b": Paired" in bps:
216217
osi.paired = True

0 commit comments

Comments
 (0)