From e4e4e336b4d6d9aba1f9e100550d8a5d732c400a Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 19 Feb 2020 16:29:59 -0500 Subject: [PATCH] Handle invalid cursor setup cleanly This seems to happen only during termination, so catch it and continue so the loop terminates. --- node-daemon/pvcnoded/DNSAggregatorInstance.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/node-daemon/pvcnoded/DNSAggregatorInstance.py b/node-daemon/pvcnoded/DNSAggregatorInstance.py index 9433eaae..a3b4bfab 100644 --- a/node-daemon/pvcnoded/DNSAggregatorInstance.py +++ b/node-daemon/pvcnoded/DNSAggregatorInstance.py @@ -336,7 +336,11 @@ class AXFRDaemonInstance(object): zone_modified = False # Set up our SQL cursor - sql_curs = self.sql_conn.cursor() + try: + sql_curs = self.sql_conn.cursor() + except: + time.sleep(0.5) + continue # Set up our basic variables domain = network.domain