commit | 8d60b1c0c41ca4a3fad3c748acc5d091f0c8dce5 | [log] [tgz] |
---|---|---|
author | Gregory Nisbet <[email protected]> | Tue Jul 14 16:26:46 2020 -0700 |
committer | Commit Bot <[email protected]> | Thu Jul 16 20:45:09 2020 +0000 |
tree | 61518b5855e3a54d511c0751828e3565028f5996 | |
parent | 6e250c0972237c753058fc406e8105bab939d97b [diff] [blame] |
[autotest] Make cli/*.py Python3-compatible syntax-wise. Note: This change intentionally making substantial changes such as changing all string literals to byte literals. BUG=chromium:990593 TEST=python3 -m python_compile cli/*.py Change-Id: I27c6428e2271e8b24ac38dc17f3e76b06b435cba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2298217 Tested-by: Gregory Nisbet <[email protected]> Reviewed-by: Mike Frysinger <[email protected]> Commit-Queue: Gregory Nisbet <[email protected]>
diff --git a/cli/atest.py b/cli/atest.py index 4a88424..524ad71 100644 --- a/cli/atest.py +++ b/cli/atest.py
@@ -14,6 +14,8 @@ execute() and output() methods. """ +from __future__ import print_function + __author__ = '[email protected] (Jean-Marc Eurin)' import os, sys, re, traceback @@ -90,7 +92,7 @@ results = action_obj.execute() except topic_common.CliError: pass - except Exception, err: + except Exception as err: traceback.print_exc() action_obj.generic_error("Unexpected exception: %s" % err) else: