Skip to content

Commit

Permalink
Merge pull request #6021 from deivid-rodriguez/fix-key-error
Browse files Browse the repository at this point in the history
Make `project.get_default_index()` populate a default name
  • Loading branch information
matteius committed Dec 6, 2023
2 parents 141443d + 6b61b7a commit d0133f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/6021.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix KeyError when using a source without a name in Pipfile
2 changes: 1 addition & 1 deletion pipenv/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ def pipfile_sources(self, expand_vars=True):
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():
Expand Down

0 comments on commit d0133f4

Please sign in to comment.