mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
intel/genxml: use a main() function
So we have less stuff in the global namespace Reviewed-by: Eric Engestrom <eric@engestrom.ch> Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18955>
This commit is contained in:
parent
0ac3b6f671
commit
ede03c99db
1 changed files with 5 additions and 1 deletions
|
|
@ -165,7 +165,7 @@ def process(xml: et.ElementTree) -> None:
|
|||
genxml[:] = new_elems
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('files', nargs='*',
|
||||
default=pathlib.Path(__file__).parent.glob('*.xml'),
|
||||
|
|
@ -194,3 +194,7 @@ if __name__ == '__main__':
|
|||
|
||||
if not args.quiet:
|
||||
print('done.')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue