From eed5bc4ed3c533f2af83ddfe30a281b760d2e058 Mon Sep 17 00:00:00 2001 From: Manuel Riquelme Date: Mon, 18 Dec 2023 09:03:33 +0100 Subject: [PATCH] =?UTF-8?q?old=5Fip=20archivo=20vac=C3=ADo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init.py b/init.py index bec206e..d6c81d9 100644 --- a/init.py +++ b/init.py @@ -16,7 +16,11 @@ while True: f.close() with open("old_ip.txt", "r") as f: - old_ip = f.readlines()[0].strip() + contenido = f.read() + if contenido != '': + old_ip = f.readlines()[0].strip() + else: + old_ip = '-ip-' if ip != old_ip: # son distintas f = open("old_ip.txt", "w")