mirror of
https://git.yoctoproject.org/poky
synced 2026-04-18 12:32:12 +02:00
oeqa/utils/httpserver: allow to pass in listening port
Being able to specify the listening port is useful when running OEQA from within a docker container, e.g. crops or any other solution. In that case, a port on the outside must be mapped to a specific port inside the container. If no port is specified for the http server module in this case, the http server would choose a random port, which is unlikely to be mapped and thus won't be reachable from the outside. (From OE-Core rev: e54391ca9068661693275fbfcfded9bc0b2606f3) Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
804489d993
commit
6f637e973a
@@ -22,10 +22,10 @@ class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||
|
||||
class HTTPService(object):
|
||||
|
||||
def __init__(self, root_dir, host='', logger=None):
|
||||
def __init__(self, root_dir, host='', port=0, logger=None):
|
||||
self.root_dir = root_dir
|
||||
self.host = host
|
||||
self.port = 0
|
||||
self.port = port
|
||||
self.logger = logger
|
||||
|
||||
def start(self):
|
||||
|
||||
Reference in New Issue
Block a user