1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-05-29 06:39:32 +03:00

protocol.py: Silence web server INFO if running without UI

Testing the outfitting.py changes brought this to light.  I know, e.g.
TCE that uses EDMC.exe likes to have no extraneous output.
This commit is contained in:
Athanasius 2021-04-06 17:58:29 +01:00
parent e7cb7dc34f
commit efc3c9030d

View File

@ -1,5 +1,6 @@
"""protocol handler for cAPI authorisation."""
import os
import sys
import threading
import urllib.error
@ -336,7 +337,9 @@ else: # Linux / Run from source
super().__init__()
self.httpd = HTTPServer(('localhost', 0), HTTPRequestHandler)
self.redirect = f'http://localhost:{self.httpd.server_port}/auth'
logger.info(f'Web server listening on {self.redirect}')
if not os.getenv("EDMC_NO_UI"):
logger.info(f'Web server listening on {self.redirect}')
self.thread: Optional[threading.Thread] = None
def start(self, master) -> None: