From 0bdad65f04ee2c3a08999989a5722fb295a4b242 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Fri, 27 Sep 2019 14:18:08 -0500 Subject: [PATCH] main: make sure to raise UinocedeError for py3 --- dvc/main.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dvc/main.py b/dvc/main.py index 8cfaded3a..998ff1644 100644 --- a/dvc/main.py +++ b/dvc/main.py @@ -55,13 +55,12 @@ def main(argv=None): except DvcParserError: ret = 254 except UnicodeError: - if is_py2: - logger.exception( - "unicode is not fully supported in DVC for Python 2.\n" - "Python 2.7 will not be maintained past 2020.\n" - "Please upgrade to Python 3 to work correctly with unicode.\n" - "Exception" - ) + if not is_py2: + raise + logger.exception( + "unicode is not supported in DVC for Python 2" + " (end-of-life January 1, 2020), please upgrade to Python 3" + ) ret = 255 except Exception: # pylint: disable=broad-except logger.exception("unexpected error")