tests: switch simple http server to python3

Python2 is phased out and not available anymore in some templates.
This commit is contained in:
Marek Marczykowski-Górecki 2020-05-27 13:41:02 +02:00
parent 096b7d611a
commit 4e6472b018
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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...