You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2019/02/16 03:03:05 UTC

[spark-website] branch asf-site updated: Fix call to input() for Python 2

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

srowen pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/spark-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 7c0d8b4  Fix call to input() for Python 2
7c0d8b4 is described below

commit 7c0d8b4282fd7405d1cffea8f65a7e88abee9426
Author: Sean Owen <se...@databricks.com>
AuthorDate: Fri Feb 15 21:02:54 2019 -0600

    Fix call to input() for Python 2
    
    We need to redirect `input` to `raw_input` in Python 2 as the main Spark merge script does.
    
    Author: Sean Owen <se...@databricks.com>
    
    Closes #183 from srowen/InputCall.
---
 merge_pr.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/merge_pr.py b/merge_pr.py
index e140b43..cac3914 100755
--- a/merge_pr.py
+++ b/merge_pr.py
@@ -30,6 +30,9 @@ import subprocess
 import sys
 import urllib2
 
+if sys.version < '3':
+    input = raw_input  # noqa
+
 
 # Remote name which points to the Github site
 PR_REMOTE_NAME = os.environ.get("PR_REMOTE_NAME", "apache-github")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org