Skip to content

Commit

Permalink
mesonlib: Add an exception for what should be unreachable code
Browse files Browse the repository at this point in the history
It gives us a little more saftey, and makes pylance happy.
  • Loading branch information
dcbaker committed Aug 10, 2021
1 parent 856c8cb commit 1e969a1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mesonbuild/mesonlib/universal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,8 @@ def dump_conf_header(ofilename: str, cdata: 'ConfigurationData', output_format:
elif output_format == 'nasm':
prelude = CONF_NASM_PRELUDE
prefix = '%'
else:
raise MesonBugException(f'Undefined output_format: "{output_format}"')

ofilename_tmp = ofilename + '~'
with open(ofilename_tmp, 'w', encoding='utf-8') as ofile:
Expand Down

0 comments on commit 1e969a1

Please sign in to comment.