From fc41978bbb02c2883c087614f4a3cc914785743c Mon Sep 17 00:00:00 2001 From: Isheros Date: Sun, 6 Dec 2020 21:54:38 -0600 Subject: [PATCH] Added set sources to DEFAULT_SOURCE if the section does not exist in the PIPFILE --- pipenv/project.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pipenv/project.py b/pipenv/project.py index 62dffd74..6feb05c7 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -821,8 +821,10 @@ class Project(object): from .vendor.plette.lockfiles import PIPFILE_SPEC_CURRENT if self.lockfile_exists: sources = self.lockfile_content.get("_meta", {}).get("sources", []) - else: + elif "source" in self.parsed_pipfile: sources = [dict(source) for source in self.parsed_pipfile["source"]] + else: + sources = self.pipfile_sources if not isinstance(sources, list): sources = [sources] return {