Set local_host and port

This commit is contained in:
Davte 2019-07-18 23:16:25 +02:00
parent 951d7d6faa
commit 2e1ab36429

View File

@ -22,6 +22,10 @@ if __name__ == '__main__':
from data.config import errors_file_name from data.config import errors_file_name
except ImportError: except ImportError:
errors_file_name = 'CicloPi.errors.log' errors_file_name = 'CicloPi.errors.log'
try:
from data.config import local_host, port
except ImportError:
local_host, port = '127.0.0.1', 3000
log_file = f"{path}/data/{log_file_name}" log_file = f"{path}/data/{log_file_name}"
errors_file = f"{path}/data/{errors_file_name}" errors_file = f"{path}/data/{errors_file_name}"
@ -65,4 +69,7 @@ if __name__ == '__main__':
) )
# Run bot(s) # Run bot(s)
logging.info("Presso ctrl+C to exit.") logging.info("Presso ctrl+C to exit.")
Bot.run() Bot.run(
local_host=local_host,
port=port
)