Thanks to visit codestin.com Credit goes to github.com
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 2a75d55 commit ee4ec51Copy full SHA for ee4ec51
1 file changed
doc/make.py
@@ -107,10 +107,13 @@ def fetch_depsy_badge():
107
The downside is that the badge only updates when the documentation
108
is rebuilt."""
109
try:
110
- with six.moves.urllib.request.urlopen(DEPSY_URL) as request:
+ request = six.moves.urllib.request.urlopen(DEPSY_URL)
111
+ try:
112
data = request.read().decode('utf-8')
113
with open(DEPSY_PATH, 'w') as output:
114
output.write(data)
115
+ finally:
116
+ request.close()
117
except six.moves.urllib.error.URLError:
118
shutil.copyfile(DEPSY_DEFAULT, DEPSY_PATH)
119
0 commit comments