IMPALA-2110: Readline bug in centos7 causes the shell to produce garbled output.
IMPALA-2110: Readline bug in centos7 causes the shell to produce garbled output.

This patch addresses the problem by not importing readline if the shell is used in
non-interactive mode. More information on the readline bug can be found
here: https://bugs.python.org/issue19884

Change-Id: Ia9dae6308c3807d3fd323449766bf7e7371f800f
Reviewed-on: http://gerrit.cloudera.org:8080/511
Reviewed-by: Ishaan Joshi <d1d1e60202ec9f2503deb1b724986485a125d802@cloudera.com>
Tested-by: Internal Jenkins

cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice,cloudera/recordservice