From 4b6634917517c94c195b66129eb177540971a9f0 Mon Sep 17 00:00:00 2001 From: Koi to Coco Date: Wed, 29 May 2024 12:05:24 +0000 Subject: [PATCH] fixed issue #1239 --- blivet/arch.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/blivet/arch.py b/blivet/arch.py index c18dcfa4c..2e1d05478 100644 --- a/blivet/arch.py +++ b/blivet/arch.py @@ -218,8 +218,11 @@ def is_t2mac(): elif not os.path.isfile(DMI_PRODUCT_NAME): t2_mac = False else: - buf = read_file(DMI_PRODUCT_NAME).strip() - t2_mac = (buf in APPLE_T2_PRODUCT_NAMES) + try: + buf = read_file(DMI_PRODUCT_NAME).strip() + t2_mac = (buf in APPLE_T2_PRODUCT_NAMES) + except UnicodeDecodeError: + t2_mac = False return t2_mac