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
+1 -5
View File
@@ -3,10 +3,6 @@ import tempfile
import os, subprocess, shlex, sys, shutil
from collections import namedtuple
from glob import glob
try:
from shlex import quote as shlex_quote
except ImportError:
from pipes import quote as shlex_quote
from .util import prepare_command, get_build_verbosity_extra_flags, download
@@ -46,7 +42,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
if shell:
print('+ %s' % args)
else:
print('+ ' + ' '.join(shlex_quote(a) for a in args))
print('+ ' + ' '.join(shlex.quote(a) for a in args))
return subprocess.check_call(args, env=env, cwd=cwd, shell=shell)