From 3d5328aa0a2d259da1c9977a677fbd3b8b1c96f3 Mon Sep 17 00:00:00 2001 From: Pior Bastida Date: Sat, 20 Oct 2018 09:31:00 -0400 Subject: [PATCH] Fix PIPENV_VERBOSITY parsing logic --- news/3069.trivial | 1 + pipenv/environments.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 news/3069.trivial diff --git a/news/3069.trivial b/news/3069.trivial new file mode 100644 index 00000000..733a3cac --- /dev/null +++ b/news/3069.trivial @@ -0,0 +1 @@ +- Fix PIPENV_VERBOSITY parsing logic diff --git a/pipenv/environments.py b/pipenv/environments.py index ca05535f..328b3ce4 100644 --- a/pipenv/environments.py +++ b/pipenv/environments.py @@ -229,9 +229,9 @@ SESSION_IS_INTERACTIVE = bool(os.isatty(sys.stdout.fileno())) # Internal, consolidated verbosity representation as an integer. The default # level is 0, increased for wordiness and decreased for terseness. PIPENV_VERBOSITY = os.environ.get("PIPENV_VERBOSITY", "") -if PIPENV_VERBOSITY.isdigit(): +try: PIPENV_VERBOSITY = int(PIPENV_VERBOSITY) -else: +except ValueError: if PIPENV_VERBOSE: PIPENV_VERBOSITY = 1 elif PIPENV_QUIET: