Skip to content

[2.7] bpo-30265: support.unlink() don't catch any OSError#1456

Merged
vstinner merged 1 commit into
python:2.7from
vstinner:support_unlink_27
May 5, 2017
Merged

[2.7] bpo-30265: support.unlink() don't catch any OSError#1456
vstinner merged 1 commit into
python:2.7from
vstinner:support_unlink_27

Conversation

@vstinner
Copy link
Copy Markdown
Member

@vstinner vstinner commented May 4, 2017

support.unlink() now only ignores ENOENT and ENOTDIR, instead of
ignoring any OSError exception.

@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented May 4, 2017

test_sax fails with this change on Windows. I would prefer to first fix http://bugs.python.org/issue30264

@vstinner vstinner changed the title bpo-30265: support.unlink() don't catch any OSError [2.7] bpo-30265: support.unlink() don't catch any OSError May 4, 2017
Comment thread Lib/test/support/__init__.py Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe invert the condition?

if exc.errno not in (errno.ENOENT, errno.ENOTDIR):
    raise

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

support.unlink() now only ignores ENOENT and ENOTDIR, instead of
ignoring any OSError exception.
@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented May 4, 2017

@serhiy-storchaka: This PR is now blocked by http://bugs.python.org/issue30264 (xml.sax bug). Would you mind to review my PR #1451 please?

@vstinner vstinner merged commit 03b2788 into python:2.7 May 5, 2017
@vstinner vstinner deleted the support_unlink_27 branch May 5, 2017 08:27
@vstinner
Copy link
Copy Markdown
Member Author

vstinner commented May 5, 2017

I fixed http://bugs.python.org/issue30264 so I was able to merged this change as well.

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.

3 participants