diff options
author | James E. King III <jking@apache.org> | 2018-11-06 09:32:51 -0500 |
---|---|---|
committer | James E. King III <jking@apache.org> | 2018-11-06 12:20:52 -0500 |
commit | f7d43ce0aa58cc7e33af425140e5a063e3f3a75f (patch) | |
tree | 474c307e1b7b9266818c4738e7b6a76e6c1ce1fd | |
parent | fed4977027f2a305d9de5c19b0dc606550eea41b (diff) | |
download | thrift-f7d43ce0aa58cc7e33af425140e5a063e3f3a75f.tar.gz |
fix build errors related to updated static code analysis tools for python and php
-rwxr-xr-x | build/docker/scripts/sca.sh | 2 | ||||
-rw-r--r-- | lib/php/lib/Base/TBase.php | 2 | ||||
-rw-r--r-- | lib/php/lib/Exception/TApplicationException.php | 2 | ||||
-rw-r--r-- | lib/php/lib/Exception/TException.php | 2 | ||||
-rw-r--r-- | test/crossrunner/run.py | 8 |
5 files changed, 8 insertions, 8 deletions
diff --git a/build/docker/scripts/sca.sh b/build/docker/scripts/sca.sh index f26ce9556..16d582619 100755 --- a/build/docker/scripts/sca.sh +++ b/build/docker/scripts/sca.sh @@ -39,7 +39,7 @@ cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/cpp/src lib/c cppcheck --force --quiet --inline-suppr --error-exitcode=1 -j2 lib/c_glib/src lib/c_glib/test test/c_glib/src tutorial/c_glib # Python code style -flake8 --ignore=E501 --exclude=lib/py/build lib/py +flake8 --ignore=W504,E501 lib/py flake8 --exclude=tutorial/py/build tutorial/py # THRIFT-4371 : generated files are excluded because they haven't been scrubbed yet flake8 --ignore=E501 --exclude="*/gen-py*/*",test/py/build test/py diff --git a/lib/php/lib/Base/TBase.php b/lib/php/lib/Base/TBase.php index f2c514a60..c61b631af 100644 --- a/lib/php/lib/Base/TBase.php +++ b/lib/php/lib/Base/TBase.php @@ -33,7 +33,7 @@ use Thrift\Type\TType; */ abstract class TBase { - static public $tmethod = array( + public static $tmethod = array( TType::BOOL => 'Bool', TType::BYTE => 'Byte', TType::I16 => 'I16', diff --git a/lib/php/lib/Exception/TApplicationException.php b/lib/php/lib/Exception/TApplicationException.php index 228add5b1..ebb6a6a89 100644 --- a/lib/php/lib/Exception/TApplicationException.php +++ b/lib/php/lib/Exception/TApplicationException.php @@ -26,7 +26,7 @@ use Thrift\Type\TType; class TApplicationException extends TException { - static public $_TSPEC = + public static $_TSPEC = array(1 => array('var' => 'message', 'type' => TType::STRING), 2 => array('var' => 'code', diff --git a/lib/php/lib/Exception/TException.php b/lib/php/lib/Exception/TException.php index e9c7c716d..7dbf83293 100644 --- a/lib/php/lib/Exception/TException.php +++ b/lib/php/lib/Exception/TException.php @@ -56,7 +56,7 @@ class TException extends \Exception } } - static public $tmethod = array( + public static $tmethod = array( TType::BOOL => 'Bool', TType::BYTE => 'Byte', TType::I16 => 'I16', diff --git a/test/crossrunner/run.py b/test/crossrunner/run.py index a7bc939ea..ef8fb60f3 100644 --- a/test/crossrunner/run.py +++ b/test/crossrunner/run.py @@ -152,7 +152,7 @@ def exec_context(port, logdir, test, prog, is_server): return ExecutionContext(prog.command, prog.workdir, prog.env, prog.stop_signal, is_server, report) -def run_test(testdir, logdir, test_dict, max_retry, async=True): +def run_test(testdir, logdir, test_dict, max_retry, async_mode=True): logger = multiprocessing.get_logger() def ensure_socket_open(sv, port, test): @@ -255,13 +255,13 @@ def run_test(testdir, logdir, test_dict, max_retry, async=True): logger.info('[%s-%s]: test failed, retrying...', test.server.name, test.client.name) retry_count += 1 except Exception: - if not async: + if not async_mode: raise logger.warn('Error executing [%s]', test.name, exc_info=True) return (retry_count, RESULT_ERROR) except: logger.info('Interrupted execution', exc_info=True) - if not async: + if not async_mode: raise stop.set() return (retry_count, RESULT_ERROR) @@ -385,7 +385,7 @@ class TestDispatcher(object): ports = m.ports() def _dispatch_sync(self, test, cont, max_retry): - r = run_test(self.testdir, self.logdir, test, max_retry, False) + r = run_test(self.testdir, self.logdir, test, max_retry, async_mode=False) cont(r) return NonAsyncResult(r) |