mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-11952 (part 1): Fix except syntax
Python 3 does not support this old except syntax: except Exception, e: Instead, it needs to be: except Exception as e: This uses impala-futurize to fix all locations of the old syntax. Testing: - The check-python-syntax.sh no longer shows errors for except syntax. Change-Id: I1737281a61fa159c8d91b7d4eea593177c0bd6c9 Reviewed-on: http://gerrit.cloudera.org:8080/19551 Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com> Reviewed-by: Michael Smith <michael.smith@cloudera.com> Tested-by: Michael Smith <michael.smith@cloudera.com>
This commit is contained in:
@@ -84,7 +84,7 @@ def dump_config(d, source_path, out):
|
||||
if isinstance(v, int):
|
||||
v = str(v)
|
||||
v_new = _substitute_env_vars(v)
|
||||
except KeyError, e:
|
||||
except KeyError as e:
|
||||
raise Exception("failed environment variable substitution for value {k}: {e}"
|
||||
.format(k=k, e=e))
|
||||
print >>out, """\
|
||||
|
||||
Reference in New Issue
Block a user