Address TODO in acl normalization script

Minor refactoring to simplify the code.

Change-Id: I9467865bdf1950c1f35c5c3bd0361c6ae8466397
This commit is contained in:
Brian Rosmaita 2023-11-30 11:43:50 -05:00
parent 7c915d64ce
commit 154f0b2c3a

View File

@ -115,10 +115,6 @@ except IndexError:
print(USAGE_STRING)
sys.exit(1)
# TODO(rosmaita): refactor this, there's nothing in the 'try'
# that will raise a KeyError, and in any case, an out-of-range slice
# reference already returns an empty list
try:
transformations = sys.argv[3:]
if transformations:
RANGE_END = LAST_TRANSFORMATION + 1
@ -126,8 +122,6 @@ try:
transformations = [str(x) for x in range(0, RANGE_END)]
elif transformations[0] == 'apply':
transformations = [str(x) for x in range(1, RANGE_END)]
except KeyError:
transformations = []
def tokens(data):