From 28b555d2c8373199dcd4341a65f24e81f7760e7e Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 28 May 2016 22:17:57 +0300 Subject: [PATCH] Whitespace fix to test new Docker setup. --- .travis.yml | 3 ++- mesonbuild/interpreter.py | 32 ++++++++++++++++---------------- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 01d8eb501..e4a59e5c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,5 @@ before_install: - docker pull jpakkane/mesonci:xenial script: - - docker run jpakkane/mesonci:xenial /bin/sh -c "cd /root && git clone https://github.com/mesonbuild/meson.git && cd meson && ./run_tests.py" + - docker cp /home/travis/mesonbuild/meson jpakkane/mesonci:xenial:/root + - docker run jpakkane/mesonci:xenial /bin/sh -c "cd /root/meson && ./run_tests.py" diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index dc039151a..c785e88ab 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -2096,23 +2096,23 @@ class Interpreter(): obj = self.to_native(obj) (posargs, _) = self.reduce_arguments(args) if method_name == 'to_string': - if len(posargs) == 0: - if obj == True: - return 'true' - else: - return 'false' - elif len(posargs) == 2 and isinstance(posargs[0], str) and isinstance(posargs[1], str): - if obj == True: - return posargs[0] - else: - return posargs[1] - else: - raise InterpreterException('bool.to_string() must have either no arguments or exactly two string arguments.') + if len(posargs) == 0: + if obj == True: + return 'true' + else: + return 'false' + elif len(posargs) == 2 and isinstance(posargs[0], str) and isinstance(posargs[1], str): + if obj == True: + return posargs[0] + else: + return posargs[1] + else: + raise InterpreterException('bool.to_string() must have either no arguments or exactly two string arguments.') elif method_name == 'to_int': - if obj == True: - return 1 - else: - return 0 + if obj == True: + return 1 + else: + return 0 else: raise InterpreterException('Unknown method "%s" for a boolean.' % method_name)