moved config settings to separate module.

This commit is contained in:
2022-06-18 21:24:11 -04:00
parent e79cf82b62
commit 217aea7a97
7 changed files with 240 additions and 34 deletions

View File

@@ -2,7 +2,7 @@
from asyncio import create_subprocess_exec, get_event_loop, sleep
from pathlib import Path
from socket import socket
from socket import gethostname, gethostbyname, socket
class Server:
@@ -73,3 +73,10 @@ class Server:
sock.bind((self.address, 0))
self.port = sock.getsockname()[1]
sock.close()
def set_to_host_ip(self):
"""Set the server to use something other than localhost."""
hostname = gethostname()
self.address = gethostbyname(hostname)
print(self.address)
self.set_safe_port()