From bebb23865549e31d6c6d36f2c6a2f7ae27b796db Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 30 May 2023 18:18:33 +0200 Subject: [PATCH] fix dying on exception --- src/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main.py b/src/main.py index 00b21fc..45d5701 100755 --- a/src/main.py +++ b/src/main.py @@ -30,8 +30,8 @@ def read_known() -> list: def daemon(): - try: - while True: + while True: + try: r = requests.get(CONFIG['URL']) soup = BeautifulSoup(r.content, features='xml') articles = soup.findAll('item') @@ -108,9 +108,9 @@ Länge: {dur} print("="*120 + "\nentering sleep for %d seconds at %s" % (int(CONFIG['SLEEP_SECS']), datetime.now())) print("="*120) sleep(int(CONFIG['SLEEP_SECS'])) - except ValueError as e: - print(e) - pass + except ValueError as e: + print(e) + pass if __name__ == "__main__": daemon()