Skip to content

FIX: Purge deprecated exception content accesses #3272

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

Merged
merged 2 commits into from
Nov 23, 2020

Conversation

effigies
Copy link
Member

@effigies effigies commented Nov 21, 2020

Summary

Apparently this was deprecated in Python 2.6 and we missed it. BaseException.__str__ is the generic way to access messages.

Fixes #3270.

List of changes proposed in this PR (pull-request)

  • Remove uses of BaseException.message; Update to BaseException.str`
  • Remove uses of OSError.__getitem__; Update to OSError.errno

Acknowledgment

  • (Mandatory) I acknowledge that this contribution will be available under the Apache 2 license.

@effigies effigies added this to the 1.6.0 milestone Nov 21, 2020
@effigies effigies changed the title FIX: Purge BaseException.message FIX: Purge deprecated exception content accesses Nov 21, 2020
@codecov
Copy link

codecov bot commented Nov 21, 2020

Codecov Report

Merging #3272 (77913ee) into master (7d538fa) will increase coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3272      +/-   ##
==========================================
+ Coverage   64.98%   65.02%   +0.03%     
==========================================
  Files         302      302              
  Lines       39947    39947              
  Branches     5283     5283              
==========================================
+ Hits        25961    25974      +13     
+ Misses      12910    12902       -8     
+ Partials     1076     1071       -5     
Flag Coverage Δ
unittests 64.94% <0.00%> (+0.03%) ⬆️

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

Impacted Files Coverage Δ
nipype/interfaces/io.py 56.41% <0.00%> (ø)
nipype/utils/filemanip.py 72.94% <0.00%> (ø)
nipype/utils/subprocess.py 86.36% <0.00%> (ø)
nipype/pipeline/plugins/base.py 59.72% <0.00%> (+1.64%) ⬆️
nipype/pipeline/plugins/legacymultiproc.py 69.11% <0.00%> (+3.43%) ⬆️

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 7d538fa...77913ee. Read the comment docs.

@effigies
Copy link
Member Author

Ready for review.

@satra satra merged commit 35b7927 into nipy:master Nov 23, 2020
@effigies effigies deleted the fix/errmsg branch November 23, 2020 13:55
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.

Consider alternative to using Exception.message to get message text
2 participants