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

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


The following commit(s) were added to refs/heads/master by this push:
     new 856fa3404 [python] Make clang_tidy work with python 3.6.9
856fa3404 is described below

commit 856fa3404b00ee02bd3bc1d77d414ede2b2cd02e
Author: Ádám Bakai <[email protected]>
AuthorDate: Fri Oct 28 15:29:40 2022 +0200

    [python] Make clang_tidy work with python 3.6.9
    
    On my system (Mac OS 12.6 (21G115), python 3.6.9) make tidy command didn't
    work, these changes fix the issues.
    
    Change-Id: I6ce1503422152c6ecd27f382795e11f1df64d67f
    Reviewed-on: http://gerrit.cloudera.org:8080/19187
    Reviewed-by: Alexey Serbin <[email protected]>
    Reviewed-by: Attila Bukor <[email protected]>
    Tested-by: Alexey Serbin <[email protected]>
---
 build-support/clang_tidy_gerrit.py | 4 ++--
 build-support/kudu_util.py         | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/build-support/clang_tidy_gerrit.py 
b/build-support/clang_tidy_gerrit.py
index aba74ae62..bff8c0e69 100755
--- a/build-support/clang_tidy_gerrit.py
+++ b/build-support/clang_tidy_gerrit.py
@@ -75,8 +75,8 @@ def run_tidy(sha="HEAD", is_rev_range=False):
                    "-extra-arg=-DCLANG_TIDY"]
         return subprocess.check_output(
             cmdline,
-            stdin=file(patch_file.name),
-            cwd=ROOT)
+            stdin=open(patch_file.name),
+            cwd=ROOT).decode()
     pool = ThreadPool(multiprocessing.cpu_count())
     try:
         return "".join(pool.imap(tidy_on_path, changed_paths))
diff --git a/build-support/kudu_util.py b/build-support/kudu_util.py
index df079f28f..86c78b260 100644
--- a/build-support/kudu_util.py
+++ b/build-support/kudu_util.py
@@ -118,4 +118,4 @@ def get_my_email():
 
 def get_thirdparty_dir():
   env = os.environ.copy()
-  return env['THIRDPARTY_DIR'] if env.has_key('THIRDPARTY_DIR') else 
os.path.join(ROOT, "thirdparty")
+  return env['THIRDPARTY_DIR'] if 'THIRDPARTY_DIR' in env else 
os.path.join(ROOT, "thirdparty")

Reply via email to