Skip to content

Narrow the Exception in test_urllib2 test. Catch URLError, not OSError#918

Merged
orsenthil merged 1 commit intopython:masterfrom
orsenthil:fix_test
Mar 31, 2017
Merged

Narrow the Exception in test_urllib2 test. Catch URLError, not OSError#918
orsenthil merged 1 commit intopython:masterfrom
orsenthil:fix_test

Conversation

@orsenthil
Copy link
Member

FileHandler catches OSError and raises them as URLError. Remove the reference to OSError in the tests.

@mention-bot
Copy link

@orsenthil, thanks for your PR! By analyzing the history of the files in this pull request, we identified @facundobatista, @Yhg1s and @loewis to be potential reviewers.

@orsenthil orsenthil merged commit ed3dd1c into python:master Mar 31, 2017
orsenthil added a commit that referenced this pull request Mar 31, 2017
…n urllib.request module. (#918) (#920)

(cherry picked from commit ed3dd1c)
orsenthil added a commit that referenced this pull request Mar 31, 2017
…n urllib.request module. (#918) (#921)

(cherry picked from commit ed3dd1c)
@serhiy-storchaka
Copy link
Member

Shouldn't the comment # XXXX remove OSError when bug fixed be removed now?

@orsenthil
Copy link
Member Author

@serhiy-storchaka, it is removed: https://github.com/python/cpython/pull/918/files - are you referring to a comment at some other place?

@@ -839,7 +838,7 @@ def test_file(self):
try:
h.file_open(req)
# XXXX remove OSError when bug fixed
Copy link
Member

Choose a reason for hiding this comment

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

I'm referring to this comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

wow, it's right there in the context and still I missed it. Thanks for point out. I will remove it.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's removed now: #1020
Thank you for catching.

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.

5 participants