test: avoid import-aliasing for trivial case
This drops the `server` alias for `http.server`. There is only a single caller, so lets just be explicit so the callsite is easier to understand. As a side effect, this unifies all the imports, no cherrypicking anymore.
This commit is contained in:
parent
8464e8d1dc
commit
7d2e895d26
1 changed files with 2 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import contextlib
|
import contextlib
|
||||||
import ctypes
|
import ctypes
|
||||||
|
import http.server
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import osbuild.sources
|
import osbuild.sources
|
||||||
|
|
@ -9,7 +10,6 @@ import tempfile
|
||||||
import threading
|
import threading
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from http import server
|
|
||||||
|
|
||||||
def errcheck(ret, func, args):
|
def errcheck(ret, func, args):
|
||||||
if ret == -1:
|
if ret == -1:
|
||||||
|
|
@ -52,7 +52,7 @@ def fileServer(path):
|
||||||
|
|
||||||
|
|
||||||
def runFileServer(path, barrier):
|
def runFileServer(path, barrier):
|
||||||
httpd = socketserver.TCPServer(('', 80), server.SimpleHTTPRequestHandler)
|
httpd = socketserver.TCPServer(('', 80), http.server.SimpleHTTPRequestHandler)
|
||||||
barrier.wait()
|
barrier.wait()
|
||||||
httpd.serve_forever()
|
httpd.serve_forever()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue