mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-9721: Fix minor python2/3 syntax regression
A minor syntax error slipped past in a recent patch. In python3, the
syntax for catching exceptions requires the 'as' keyword. This error
was missed in code review.
Until automated python3 testing set up, this kind of error is likely
to repeat. See IMPALA-9724.
Change-Id: I0d36c609a3600c8084efcce0026537227144b27d
Reviewed-on: http://gerrit.cloudera.org:8080/15856
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: David Knupp <dknupp@cloudera.com>
(cherry picked from commit 6e0085c220)
This commit is contained in:
@@ -244,13 +244,13 @@ class ImpalaShell(object, cmd.Cmd):
|
||||
warning = "WARNING: history_max option malformed %s\n" % options.history_max
|
||||
print(warning, file=sys.stderr)
|
||||
self.readline.set_history_length(1000)
|
||||
except IOError, i:
|
||||
except IOError as i:
|
||||
warning = "WARNING: Unable to load command history (disabling impala-shell " \
|
||||
"command history): %s" % i
|
||||
print(warning, file=sys.stderr)
|
||||
# This history file exists but is not readable, disable readline.
|
||||
self._disable_readline()
|
||||
except ImportError, i:
|
||||
except ImportError as i:
|
||||
warning = "WARNING: Unable to import readline module (disabling impala-shell " \
|
||||
"command history): %s" % i
|
||||
print(warning, file=sys.stderr)
|
||||
|
||||
Reference in New Issue
Block a user