From 0aca562f8a632a7a0c49934c36b1ac2cf9928cd6 Mon Sep 17 00:00:00 2001 From: Andrew Sultana Date: Tue, 13 Mar 2018 11:26:33 +0000 Subject: [PATCH] Fix `do_outdated()` when `pip freeze` is blank - If no packages are installed, `results` contains a single empty string. This causes problems in the subsequent call to `convert_deps_from_pip`. Therefore filter out empty strings from `results` to avoid this. - Fixes #1699 --- pipenv/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pipenv/core.py b/pipenv/core.py index 9886ede2fb..16e947f58a 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -1701,6 +1701,7 @@ def do_py(system=False): def do_outdated(): packages = {} results = delegator.run('{0} freeze'.format(which('pip'))).out.strip().split('\n') + results = filter(bool, results) for result in results: packages.update(convert_deps_from_pip(result))