mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-05-30 15:19:40 +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:
parent
e7cb7dc34f
commit
efc3c9030d
@ -1,5 +1,6 @@
|
|||||||
"""protocol handler for cAPI authorisation."""
|
"""protocol handler for cAPI authorisation."""
|
||||||
|
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import urllib.error
|
import urllib.error
|
||||||
@ -336,7 +337,9 @@ else: # Linux / Run from source
|
|||||||
super().__init__()
|
super().__init__()
|
||||||
self.httpd = HTTPServer(('localhost', 0), HTTPRequestHandler)
|
self.httpd = HTTPServer(('localhost', 0), HTTPRequestHandler)
|
||||||
self.redirect = f'http://localhost:{self.httpd.server_port}/auth'
|
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
|
self.thread: Optional[threading.Thread] = None
|
||||||
|
|
||||||
def start(self, master) -> None:
|
def start(self, master) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user