From b43309be754d5647f5d07acd1038dfdfee17272a Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Mon, 8 Apr 2019 15:55:52 -0700 Subject: [PATCH] Avoid rare crash when scanning CoreStorage volumes --- .bin/Scripts/functions/data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/data.py b/.bin/Scripts/functions/data.py index eb59d030..a8a4deb7 100644 --- a/.bin/Scripts/functions/data.py +++ b/.bin/Scripts/functions/data.py @@ -111,7 +111,7 @@ def find_core_storage_volumes(device_path=None): # Check log for found volumes cs_vols = {} - with open(log_path, 'r') as f: + with open(log_path, 'r', encoding='utf-8', errors='ignore') as f: for line in f.readlines(): r = re.match( r'^.*echo "([^"]+)" . dmsetup create test(\d)$',