kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From granthe...@apache.org
Subject [kudu] 03/03: [build] Fix print function usage in Python 2
Date Thu, 16 Jan 2020 22:46:53 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 5818a839e6219347ea28385dd7b3bbf2ab475e27
Author: Grant Henke <granthenke@apache.org>
AuthorDate: Thu Jan 16 16:17:30 2020 -0600

    [build] Fix print function usage in Python 2
    
    This fixes the scripts that use the Python 3 print function when
    running in Python 2.
    
    Change-Id: Iee528e66fc017180e50b796f8cc1d2ee31be8a5e
    Reviewed-on: http://gerrit.cloudera.org:8080/15054
    Reviewed-by: Adar Dembo <adar@cloudera.com>
    Tested-by: Kudu Jenkins
---
 build-support/clang_tidy_gerrit.py | 3 +++
 build-support/iwyu.py              | 2 ++
 src/kudu/scripts/graph-metrics.py  | 3 +++
 3 files changed, 8 insertions(+)

diff --git a/build-support/clang_tidy_gerrit.py b/build-support/clang_tidy_gerrit.py
index d7d1644..35f32f6 100755
--- a/build-support/clang_tidy_gerrit.py
+++ b/build-support/clang_tidy_gerrit.py
@@ -17,6 +17,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
+# Support the print function in Python 2.
+from __future__ import print_function
+
 import argparse
 import collections
 import json
diff --git a/build-support/iwyu.py b/build-support/iwyu.py
index 9af043b..bef4296 100755
--- a/build-support/iwyu.py
+++ b/build-support/iwyu.py
@@ -17,7 +17,9 @@
 # specific language governing permissions and limitations
 # under the License.
 
+# Support the print function in Python 2.
 from __future__ import print_function
+
 from io import StringIO
 import glob
 import json
diff --git a/src/kudu/scripts/graph-metrics.py b/src/kudu/scripts/graph-metrics.py
index 853e2e4..35d606f 100755
--- a/src/kudu/scripts/graph-metrics.py
+++ b/src/kudu/scripts/graph-metrics.py
@@ -20,6 +20,9 @@
 # Script which parses a test log for 'metrics: ' lines emited by
 # TimeSeriesCollector, and constructs a graph from them
 
+# Support the print function in Python 2.
+from __future__ import print_function
+
 import os
 import re
 import simplejson


Mime
View raw message