[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: