mirror of
https://github.com/grahampugh/macadmin-scripts.git
synced 2025-12-17 17:56:33 +00:00
fix a pylint issue with plistlib
This commit is contained in:
parent
c249079df9
commit
701bdbe3f2
@ -147,7 +147,7 @@ def read_plist_from_string(bytestring):
|
|||||||
return plistlib.loads(bytestring)
|
return plistlib.loads(bytestring)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
# plistlib module doesn't have a load function (as in Python 2)
|
# plistlib module doesn't have a load function (as in Python 2)
|
||||||
return plistlib.readPlistFromString(bytestring)
|
return plistlib.readPlistFromString(bytestring) # pylint: disable=no-member
|
||||||
|
|
||||||
|
|
||||||
def write_plist(plist_object, filepath):
|
def write_plist(plist_object, filepath):
|
||||||
@ -806,7 +806,7 @@ def main():
|
|||||||
for index, product_id in enumerate(product_info):
|
for index, product_id in enumerate(product_info):
|
||||||
not_valid = ""
|
not_valid = ""
|
||||||
if not product_info[product_id]["UnsupportedModels"]:
|
if not product_info[product_id]["UnsupportedModels"]:
|
||||||
not_valid = "WARNING: No unsupported model data"
|
not_valid += "WARNING: No unsupported model data "
|
||||||
else:
|
else:
|
||||||
if (
|
if (
|
||||||
hw_model in product_info[product_id]["UnsupportedModels"]
|
hw_model in product_info[product_id]["UnsupportedModels"]
|
||||||
@ -814,7 +814,7 @@ def main():
|
|||||||
):
|
):
|
||||||
not_valid = "Unsupported Model Identifier"
|
not_valid = "Unsupported Model Identifier"
|
||||||
if not product_info[product_id]["BoardIDs"]:
|
if not product_info[product_id]["BoardIDs"]:
|
||||||
not_valid = "WARNING: No supported Board ID data"
|
not_valid += "WARNING: No supported Board ID data "
|
||||||
else:
|
else:
|
||||||
if board_id not in product_info[product_id]["BoardIDs"] and is_vm == False:
|
if board_id not in product_info[product_id]["BoardIDs"] and is_vm == False:
|
||||||
not_valid = "Unsupported Board ID"
|
not_valid = "Unsupported Board ID"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user