Revert previous commit
This commit is contained in:
parent
a8e4b7065a
commit
72e1499d27
1 changed files with 2 additions and 8 deletions
|
@ -8,18 +8,12 @@ except ImportError:
|
|||
|
||||
import re
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import urllib.request
|
||||
import zipfile
|
||||
from io import BytesIO
|
||||
from os import listdir, path
|
||||
|
||||
if sys.version_info.major > 2:
|
||||
import urllib2 as request
|
||||
else:
|
||||
import urllib.request as request
|
||||
|
||||
|
||||
# --- Globals ----------------------------------------------
|
||||
PLUGINS = """
|
||||
auto-pairs https://github.com/jiangmiao/auto-pairs
|
||||
|
@ -79,7 +73,7 @@ SOURCE_DIR = path.join(path.dirname(__file__), "sources_non_forked_cache")
|
|||
|
||||
def download_extract_replace(plugin_name, zip_path, temp_dir, source_dir):
|
||||
# Download and extract file in temp dir
|
||||
with request.urlopen(zip_path) as req:
|
||||
with urllib.request.urlopen(zip_path) as req:
|
||||
zip_f = zipfile.ZipFile(BytesIO(req.read()))
|
||||
zip_f.extractall(temp_dir)
|
||||
content_disp = req.headers.get("Content-Disposition")
|
||||
|
|
Loading…
Reference in a new issue