Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] Moved access to first element to after the length check #2265

Merged
merged 3 commits into from
Apr 5, 2020
Merged

[Bugfix] Moved access to first element to after the length check #2265

merged 3 commits into from
Apr 5, 2020

Conversation

Qu4tro
Copy link
Contributor

@Qu4tro Qu4tro commented Apr 3, 2020

  • Added tests for changed code.
  • Updated documentation for changed code.

Hey 👋
Quick fix for a problem I was having. My pyproject.toml tool.poetry.packages was wrong, but I was getting [IndexError] list index out of range which is not very helpful.

Clearing this, helped me get an error message, that was actually helpful:
/home/user/repo/pkg/pkg does not contain any element

It needs some tests, but still unsure of where to start.

@finswimmer finswimmer added the area/error-handling Bad error messages/insufficient error handling label Apr 4, 2020
@abn
Copy link
Member

abn commented Apr 4, 2020

@Qu4tro thank you for the fix. Can you also apply the same changes to https://github.com/python-poetry/core/blob/master/poetry/core/masonry/utils/package_include.py please?

Also, might be great to have a test case so that we do not regress later.

@Qu4tro
Copy link
Contributor Author

Qu4tro commented Apr 5, 2020

Done and done.

@abn abn merged commit 511d753 into python-poetry:master Apr 5, 2020
@Qu4tro Qu4tro deleted the fix/crash-on-no-elements-in-include branch April 5, 2020 22:48
@sdispater sdispater mentioned this pull request Jun 5, 2020
Copy link

github-actions bot commented Mar 1, 2024

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/error-handling Bad error messages/insufficient error handling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants