From 4c8eba1d31807da0286fa922e7cb8756665ca30b Mon Sep 17 00:00:00 2001 From: Ruakij Date: Mon, 2 Aug 2021 14:07:56 +0200 Subject: [PATCH] Added proper exception raising --- daemon.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.py b/daemon.py index ae0eadc..53ac81f 100755 --- a/daemon.py +++ b/daemon.py @@ -129,12 +129,12 @@ def updateNsData(zone): dumpFile = f"{adaptedZone}.dump.js" if dumpZoneData(zone, dumpFile) != 0: - raise "Dumping data failed!" + raise Exception("Dumping data failed!") zone = adaptedZone adaptFileForRequire(zone, dumpFile) if dnscontrolPush(zone) != 0: - raise "Pushing data failed!" + raise Exception("Pushing data failed!") except: log.error(f'{adaptedZone} |\t{sys.exc_info()}') log.error(f'{adaptedZone} |\tUpdating NS-Data failed!')