bin/khronos-update: add workaround for python bug 9625
The bug causes `choices` to break `nargs='*'`. Signed-off-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6057>
This commit is contained in:
parent
aa5c3911d6
commit
859687313b
|
@ -191,7 +191,10 @@ if __name__ == '__main__':
|
|||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('apis', nargs='*',
|
||||
choices=[group['api'] for group in SOURCES],
|
||||
# the `[[]]` here is a workaround for python bug 9625
|
||||
# where having `choices` breaks `nargs='*'`:
|
||||
# https://bugs.python.org/issue9625
|
||||
choices=[group['api'] for group in SOURCES] + [[]],
|
||||
help='Only update the APIs specified.')
|
||||
args = parser.parse_args()
|
||||
|
||||
|
|
Loading…
Reference in New Issue