diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-10-04 02:18:26 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-10-04 02:18:26 +0300 |
commit | 4dff3f9fb3efb1f9c32484cbdc2f0668de782913 (patch) | |
tree | 8c563a58788d285e0d9cdfab1d240cdf226287c3 /mesonconf.py | |
parent | c02009a6989710714cc0e2becc9cad11d4b0381d (diff) | |
download | meson-4dff3f9fb3efb1f9c32484cbdc2f0668de782913.zip meson-4dff3f9fb3efb1f9c32484cbdc2f0668de782913.tar.gz meson-4dff3f9fb3efb1f9c32484cbdc2f0668de782913.tar.bz2 |
Refactored option classes to mesonlib.
Diffstat (limited to 'mesonconf.py')
-rwxr-xr-x | mesonconf.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonconf.py b/mesonconf.py index db526b0..6922ea6 100755 --- a/mesonconf.py +++ b/mesonconf.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright 2014 The Meson development team +# Copyright 2014-2015 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ import sys, os import pickle import argparse -import coredata, optinterpreter +import coredata, mesonlib from meson import build_types, layouts, warning_levels parser = argparse.ArgumentParser() @@ -127,15 +127,15 @@ class Conf: self.coredata.localedir = v elif k in self.coredata.user_options: tgt = self.coredata.user_options[k] - if isinstance(tgt, optinterpreter.UserBooleanOption): + if isinstance(tgt, mesonlib.UserBooleanOption): tgt.set_value(self.tobool(v)) - elif isinstance(tgt, optinterpreter.UserComboOption): + elif isinstance(tgt, mesonlib.UserComboOption): try: tgt.set_value(v) - except optinterpreter.OptionException: + except coredata.MesonException: raise ConfException('Value of %s must be one of %s.' % (k, tgt.choices)) - elif isinstance(tgt, optinterpreter.UserStringOption): + elif isinstance(tgt, mesonlib.UserStringOption): tgt.set_value(v) else: raise ConfException('Internal error, unknown option type.') |