We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e1281a commit ee1bc0cCopy full SHA for ee1bc0c
docs/jsonschema_role.py
@@ -1,14 +1,9 @@
1
from datetime import datetime
2
import errno
3
import os
4
+import urllib.request
5
6
from docutils import nodes
-
7
-try:
8
- import urllib2 as urllib
9
-except ImportError:
10
- import urllib.request as urllib
11
12
from lxml import html
13
import certifi
14
@@ -69,8 +64,8 @@ def fetch_or_load(spec_path):
69
64
if error.errno != errno.ENOENT:
70
65
raise
71
66
72
- request = urllib.Request(VALIDATION_SPEC, headers=headers)
73
- response = urllib.urlopen(request, cafile=certifi.where())
67
+ request = urllib.request.Request(VALIDATION_SPEC, headers=headers)
68
+ response = urllib.request.urlopen(request, cafile=certifi.where())
74
75
if response.code == 200:
76
with open(spec_path, "w+b") as spec:
0 commit comments