decide device and model lines

This commit is contained in:
Graham R Pugh 2020-08-18 15:15:08 +02:00
parent 445e8054e1
commit 5e6c1bde60

View File

@ -502,7 +502,7 @@ def get_device_ids(filename):
supported_device_ids = "" supported_device_ids = ""
with open(filename) as search: with open(filename) as search:
for line in search: for line in search:
line = line.rstrip() # remove '\n' at end of line line = line.decode("utf8").rstrip() # remove '\n' at end of line
if "supportedDeviceIDs" in line: if "supportedDeviceIDs" in line:
supported_device_ids = line.lstrip("var supportedDeviceIDs = ") supported_device_ids = line.lstrip("var supportedDeviceIDs = ")
return supported_device_ids return supported_device_ids
@ -514,7 +514,7 @@ def get_unsupported_models(filename):
unsupported_models = "" unsupported_models = ""
with open(filename) as search: with open(filename) as search:
for line in search: for line in search:
line = line.rstrip() # remove '\n' at end of line line = line.decode("utf8").rstrip() # remove '\n' at end of line
if "nonSupportedModels" in line: if "nonSupportedModels" in line:
unsupported_models = line.lstrip("var nonSupportedModels = ") unsupported_models = line.lstrip("var nonSupportedModels = ")
return unsupported_models return unsupported_models