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

tests: Handle ImportError explicitly, improve comparisons against None #14903

Merged
merged 4 commits into from Dec 13, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Next

Handle exception as ImportError

  • Loading branch information...
daniel-s-ingram committed Dec 9, 2018
commit 16d293772365d57cc1a279d5ad0fa6f44b12ed54
@@ -25,7 +25,7 @@
import codecs
try:
from urllib.request import Request,urlopen
except:
except ImportError:

This comment has been minimized.

Copy link
@jnewbery

jnewbery Dec 13, 2018

Member

This exception handling is a vestige from when github-merge.py supported Python 2 and Python 3. We only support Python 3 now so we should be able to remove it entirely and just import from urllib.request.

from urllib2 import Request,urlopen

# External tools (can be overridden using environment)
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.