Removing Python 2-compatible imports of urllib.request.open and shlex.quote

This commit is contained in:
Yannick Jadoul
2020-02-04 11:58:52 +01:00
parent b900b2d51e
commit 67ec8fe99f
4 changed files with 7 additions and 26 deletions
+2 -7
View File
@@ -1,13 +1,8 @@
from fnmatch import fnmatch
import warnings
import os
import os, urllib.request
from time import sleep
try:
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
def prepare_command(command, **kwargs):
'''
@@ -68,7 +63,7 @@ def download(url, dest):
repeat_num = 3
for i in range(repeat_num):
try:
response = urlopen(url)
response = urllib.request.urlopen(url)
except:
if i == repeat_num - 1:
raise