Skip to content

Commit

Permalink
Fix do_outdated() when pip freeze is blank
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
Andrew Sultana authored Mar 13, 2018
1 parent e672a80 commit 0aca562
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down

0 comments on commit 0aca562

Please sign in to comment.