From 5fe60e0e5ed7005613a85616f8c1ea9888a295de Mon Sep 17 00:00:00 2001 From: Dima YaFlay <93622229+YaFlay@users.noreply.github.com> Date: Sun, 21 Nov 2021 19:06:39 +0300 Subject: [PATCH] 1.0.2 Fixing some bugs --- ip_adress.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ip_adress.py b/ip_adress.py index d3daa56..774c130 100644 --- a/ip_adress.py +++ b/ip_adress.py @@ -1,6 +1,7 @@ import socket -ip = open('my_ip.txt') -ip_adress = ip.read() +if os.path.isfile('C:/Python/Project/tg_bot/files/received/my_ip.txt): + ip = open('C:/Python/Project/tg_bot/files/received/my_ip.txt', 'r') + ip_adress = ip.read() HOST = ip_adress # Standard loopback interface address (localhost) PORT = 65432 # Port to listen on (non-privileged ports are > 1023)