mirror of
https://github.com/grahampugh/macadmin-scripts.git
synced 2025-12-18 10:16:37 +00:00
decide device and model lines
This commit is contained in:
parent
445e8054e1
commit
5e6c1bde60
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user