diff options
author | Eric Engestrom <eric@engestrom.ch> | 2020-07-24 14:20:44 +0200 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2020-07-24 14:22:36 +0200 |
commit | 859687313be7d90433f631a7ef35af9791350a9f (patch) | |
tree | e99035ae2bb27bf2e1e7ac445dc298b5a47c1591 /bin | |
parent | aa5c3911d6721f40a0a1b91ccb557af0b987ee38 (diff) |
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>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/khronos-update.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/khronos-update.py b/bin/khronos-update.py index 6f93c71f831..cc82a07b08c 100755 --- a/bin/khronos-update.py +++ b/bin/khronos-update.py @@ -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() |