mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix test failing on python 3.10
This commit is contained in:
parent
a445a73e66
commit
821f71cc4c
@ -5,12 +5,8 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
|
||||
import subprocess, os, time
|
||||
import subprocess, os, time, shutil
|
||||
from collections import namedtuple
|
||||
try:
|
||||
from distutils.spawn import find_executable
|
||||
except ImportError: # windows
|
||||
find_executable = lambda x: None
|
||||
|
||||
from calibre.ptempfile import TemporaryDirectory
|
||||
from calibre.srv.errors import HTTPForbidden
|
||||
@ -234,7 +230,7 @@ class TestAuth(BaseTest):
|
||||
self.ae(urlopen(server).read(), b'closed')
|
||||
|
||||
# Check using curl
|
||||
curl = find_executable('curl')
|
||||
curl = shutil.which('curl')
|
||||
if curl:
|
||||
def docurl(data, *args):
|
||||
cmd = [curl] + list(args) + ['http://localhost:%d/closed' % server.address[1]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user