Avoid rare crash when scanning CoreStorage volumes

This commit is contained in:
2Shirt 2019-04-08 15:55:52 -07:00
parent 3ff0bcd3c9
commit b43309be75
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -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)$',