mesonlib: Add an exception for what should be unreachable code

It gives us a little more saftey, and makes pylance happy.
pull/9143/head
Dylan Baker 3 years ago committed by Daniel Mensinger
parent a5c4cf3a3f
commit 0f5f265a16
  1. 2
      mesonbuild/mesonlib/universal.py

@ -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:

Loading…
Cancel
Save