[oe-commits] [openembedded-core] 16/33: oeqa/utils/httpserver: allow to pass in listening port

git at git.openembedded.org git at git.openembedded.org
Mon Dec 16 23:27:57 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master
in repository openembedded-core.

commit e54391ca9068661693275fbfcfded9bc0b2606f3
Author: André Draszik <git at andred.net>
AuthorDate: Thu Dec 12 21:52:09 2019 +0000

    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.
    
    Signed-off-by: André Draszik <git at andred.net>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/lib/oeqa/utils/httpserver.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py
index aa43559..58d3c3b 100644
--- a/meta/lib/oeqa/utils/httpserver.py
+++ b/meta/lib/oeqa/utils/httpserver.py
@@ -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):

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list