moved config settings to separate module.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user