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 committed 2021-04-12 08:31:48 +01:00
1 parent e7cb7dc34f
commit efc3c9030d
1 file changed
+4 -1
+4 -1
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: