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

Fix cygwin NoneType error if POSIX path in dest #1964

Merged
merged 1 commit into from
Oct 3, 2020
Merged

Fix cygwin NoneType error if POSIX path in dest #1964

merged 1 commit into from
Oct 3, 2020

Conversation

danyeaw
Copy link
Sponsor Contributor

@danyeaw danyeaw commented Oct 3, 2020

Closes #1962. Corrects an AttributeError for a regex match not found if the cygwin path is already in POSIX format.

I am not able to reproduce the issue in #1962, but this PR guards against trying modify the virtualenv path if the regex doesn't return a match.

Thanks for contributing, make sure you address all the checklists (for details on how see

development documentation)!

  • ran the linter to address style issues (tox -e fix_lint)
  • wrote descriptive pull request text
  • ensured there are test(s) validating the fix
  • added news fragment in docs/changelog folder
  • updated/extended the documentation

@codecov
Copy link

codecov bot commented Oct 3, 2020

Codecov Report

Merging #1964 into main will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1964      +/-   ##
==========================================
- Coverage   93.93%   93.91%   -0.03%     
==========================================
  Files          86       86              
  Lines        4237     4239       +2     
==========================================
+ Hits         3980     3981       +1     
- Misses        257      258       +1     
Flag Coverage Δ
#tests 93.91% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/virtualenv/activation/via_template.py 100.00% <100.00%> (ø)
src/virtualenv/seed/embed/base_embed.py 96.22% <0.00%> (-1.89%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 368f830...d717f28. Read the comment docs.

Closes #1962. Corrects an AttributeError for a regex match not
found if the cygwin path is already in posix format.
Copy link
Contributor

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaborbernat gaborbernat merged commit adcf327 into pypa:main Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'NoneType' object has no attribute 'group' with virtualenv 20.0.32 on CygWin
2 participants