Added proper exception raising
This commit is contained in:
parent
6046842c94
commit
4c8eba1d31
@ -129,12 +129,12 @@ def updateNsData(zone):
|
|||||||
|
|
||||||
dumpFile = f"{adaptedZone}.dump.js"
|
dumpFile = f"{adaptedZone}.dump.js"
|
||||||
if dumpZoneData(zone, dumpFile) != 0:
|
if dumpZoneData(zone, dumpFile) != 0:
|
||||||
raise "Dumping data failed!"
|
raise Exception("Dumping data failed!")
|
||||||
zone = adaptedZone
|
zone = adaptedZone
|
||||||
|
|
||||||
adaptFileForRequire(zone, dumpFile)
|
adaptFileForRequire(zone, dumpFile)
|
||||||
if dnscontrolPush(zone) != 0:
|
if dnscontrolPush(zone) != 0:
|
||||||
raise "Pushing data failed!"
|
raise Exception("Pushing data failed!")
|
||||||
except:
|
except:
|
||||||
log.error(f'{adaptedZone} |\t{sys.exc_info()}')
|
log.error(f'{adaptedZone} |\t{sys.exc_info()}')
|
||||||
log.error(f'{adaptedZone} |\tUpdating NS-Data failed!')
|
log.error(f'{adaptedZone} |\tUpdating NS-Data failed!')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user