Update chromepolicy.py (#1610)

split of an empty string returns [''], the API wants []
This commit is contained in:
Ross Scroggs
2023-03-04 08:33:22 -08:00
committed by GitHub
parent 1a1f100902
commit 3a5486889f

View File

@@ -408,7 +408,7 @@ def update_policy():
f'{expected_enums}, got {value}'
controlflow.system_error_exit(8, msg)
elif vtype in ['TYPE_LIST']:
value = value.split(',')
value = value.split(',') if value else []
if myarg == 'chrome.users.chromebrowserupdates' and \
cased_field == 'targetVersionPrefixSetting':
mg = re.compile(r'^([a-z]+)-(\d+)$').match(value)