diff options
author | jpakkane <jpakkane@gmail.com> | 2015-06-19 13:10:07 +0300 |
---|---|---|
committer | jpakkane <jpakkane@gmail.com> | 2015-06-19 13:10:07 +0300 |
commit | f15eb466fb5ab0713b1614bdc973d242bdb4b4ad (patch) | |
tree | 906822ecdb2b7b441f8e5268329046b0ee3e1def | |
parent | 74b0fad8f11455f79c142baf95fa0ebb8ce86c62 (diff) | |
parent | bc865ab9436a7274a08f08cfa98d91340cfe419a (diff) | |
download | meson-f15eb466fb5ab0713b1614bdc973d242bdb4b4ad.zip meson-f15eb466fb5ab0713b1614bdc973d242bdb4b4ad.tar.gz meson-f15eb466fb5ab0713b1614bdc973d242bdb4b4ad.tar.bz2 |
Merge pull request #162 from mesonbuild/lint_errors
Fix some bugs when linting code
-rw-r--r-- | interpreter.py | 2 | ||||
-rwxr-xr-x | mesonconf.py | 3 | ||||
-rw-r--r-- | optinterpreter.py | 2 | ||||
-rwxr-xr-x | run_tests.py | 2 | ||||
-rw-r--r-- | xcodebackend.py | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/interpreter.py b/interpreter.py index 84db87e..863b23b 100644 --- a/interpreter.py +++ b/interpreter.py @@ -1681,7 +1681,7 @@ class Interpreter(): isinstance(value, str) or\ isinstance(value, int) or \ isinstance(value, list) or \ - isinstance(value, File): + isinstance(value, mesonlib.File): return True return False diff --git a/mesonconf.py b/mesonconf.py index ec6faef..eeedc2b 100755 --- a/mesonconf.py +++ b/mesonconf.py @@ -198,8 +198,7 @@ class Conf: if __name__ == '__main__': options = parser.parse_args() - if len(options.directory) > 1: - print(args) + if len(options.directory) < 1: print('%s <build directory>' % sys.argv[0]) print('If you omit the build directory, the current directory is substituted.') sys.exit(1) diff --git a/optinterpreter.py b/optinterpreter.py index 668efcd..312427e 100644 --- a/optinterpreter.py +++ b/optinterpreter.py @@ -61,7 +61,7 @@ class UserBooleanOption(UserOption): def set_value(self, newvalue): if not isinstance(newvalue, bool): - raise OptionException('Value "%s" for boolean option "%s" is not a boolean.' % (valuestring, self.name)) + raise OptionException('Value "%s" for boolean option "%s" is not a boolean.' % (str(newvalue), self.name)) self.value = newvalue def parse_string(self, valuestring): diff --git a/run_tests.py b/run_tests.py index 3549e11..673c55b 100755 --- a/run_tests.py +++ b/run_tests.py @@ -48,7 +48,7 @@ meson_command = './meson.py' class StopException(Exception): def __init__(self): - super(Exception, self).__init__('Stopped by user') + super().__init__('Stopped by user') stop = False def stop_handler(signal, frame): diff --git a/xcodebackend.py b/xcodebackend.py index 9bb9793..a5df6a5 100644 --- a/xcodebackend.py +++ b/xcodebackend.py @@ -16,6 +16,8 @@ import backends, build import mesonlib import uuid, os, sys +from coredata import MesonException + class XCodeBackend(backends.Backend): def __init__(self, build, interp): super().__init__(build, interp) |