From 2e1ab364297ddabd8eaa3855f1d5a0e43b082d87 Mon Sep 17 00:00:00 2001 From: Davte Date: Thu, 18 Jul 2019 23:16:25 +0200 Subject: [PATCH] Set local_host and port --- ciclopibot/bot.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ciclopibot/bot.py b/ciclopibot/bot.py index 6fe83ca..bff2cb3 100644 --- a/ciclopibot/bot.py +++ b/ciclopibot/bot.py @@ -22,6 +22,10 @@ if __name__ == '__main__': from data.config import errors_file_name except ImportError: 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}" errors_file = f"{path}/data/{errors_file_name}" @@ -65,4 +69,7 @@ if __name__ == '__main__': ) # Run bot(s) logging.info("Presso ctrl+C to exit.") - Bot.run() + Bot.run( + local_host=local_host, + port=port + )