This is an automated email from the ASF dual-hosted git repository.

jking pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git


The following commit(s) were added to refs/heads/master by this push:
     new f7d43ce  fix build errors related to updated static code analysis 
tools for python and php
f7d43ce is described below

commit f7d43ce0aa58cc7e33af425140e5a063e3f3a75f
Author: James E. King III <[email protected]>
AuthorDate: Tue Nov 6 09:32:51 2018 -0500

    fix build errors related to updated static code analysis tools for python 
and php
---
 build/docker/scripts/sca.sh                     | 2 +-
 lib/php/lib/Base/TBase.php                      | 2 +-
 lib/php/lib/Exception/TApplicationException.php | 2 +-
 lib/php/lib/Exception/TException.php            | 2 +-
 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 f26ce95..16d5826 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 f2c514a..c61b631 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 228add5..ebb6a6a 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 e9c7c71..7dbf832 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 a7bc939..ef8fb60 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)
 

Reply via email to