diff --git a/news/6021.bugfix.rst b/news/6021.bugfix.rst new file mode 100644 index 00000000..c3c82ca5 --- /dev/null +++ b/news/6021.bugfix.rst @@ -0,0 +1 @@ +Fix KeyError when using a source without a name in Pipfile diff --git a/pipenv/project.py b/pipenv/project.py index 9495370e..f06ef93c 100644 --- a/pipenv/project.py +++ b/pipenv/project.py @@ -1023,7 +1023,7 @@ class Project: return sources def get_default_index(self): - return self.pipfile_sources()[0] + return self.populate_source(self.pipfile_sources()[0]) def get_index_by_name(self, index_name): for source in self.pipfile_sources():