tests: switch simple http server to python3
Python2 is phased out and not available anymore in some templates.
This commit is contained in:
parent
096b7d611a
commit
4e6472b018
@ -194,7 +194,7 @@ Test package
|
|||||||
if self.repo_running:
|
if self.repo_running:
|
||||||
return
|
return
|
||||||
self.repo_proc = self.loop.run_until_complete(self.updatevm.run(
|
self.repo_proc = self.loop.run_until_complete(self.updatevm.run(
|
||||||
'cd /tmp/repo && python -m SimpleHTTPServer 8080',
|
'cd /tmp/repo && python3 -m http.server 8080',
|
||||||
stdout=subprocess.DEVNULL,
|
stdout=subprocess.DEVNULL,
|
||||||
stderr=subprocess.STDOUT))
|
stderr=subprocess.STDOUT))
|
||||||
self.repo_running = True
|
self.repo_running = True
|
||||||
|
@ -1443,12 +1443,12 @@ SHA256:
|
|||||||
if self.template.count("debian") or self.template.count("whonix"):
|
if self.template.count("debian") or self.template.count("whonix"):
|
||||||
self.create_repo_apt()
|
self.create_repo_apt()
|
||||||
self.loop.run_until_complete(self.netvm_repo.run(
|
self.loop.run_until_complete(self.netvm_repo.run(
|
||||||
'cd /tmp/apt-repo && python -m SimpleHTTPServer 8080',
|
'cd /tmp/apt-repo && python3 -m http.server 8080',
|
||||||
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL))
|
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL))
|
||||||
elif self.template.count("fedora"):
|
elif self.template.count("fedora"):
|
||||||
self.create_repo_yum()
|
self.create_repo_yum()
|
||||||
self.loop.run_until_complete(self.netvm_repo.run(
|
self.loop.run_until_complete(self.netvm_repo.run(
|
||||||
'cd /tmp/yum-repo && python -m SimpleHTTPServer 8080',
|
'cd /tmp/yum-repo && python3 -m http.server 8080',
|
||||||
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL))
|
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL))
|
||||||
else:
|
else:
|
||||||
# not reachable...
|
# not reachable...
|
||||||
|
Loading…
Reference in New Issue
Block a user