@@ -232,6 +232,7 @@ def reloadConnections(self):
232232 self .actionsDb [ unicode (a .text ()) ] = a
233233
234234 for dbname in self .actionsDb :
235+ db = None
235236 try :
236237 db = self .actionsDb [dbname ].connect ()
237238 con = db .con
@@ -561,6 +562,7 @@ def run(self):
561562 'Following argument is not specified.\n ' + ',' .join (empties ))
562563 return
563564
565+ db = None
564566 try :
565567 dbname = str (self .dock .comboConnections .currentText ())
566568 db = self .actionsDb [dbname ].connect ()
@@ -629,6 +631,7 @@ def export(self):
629631 'Following argument is not specified.\n ' + ',' .join (empties ))
630632 return
631633
634+ db = None
632635 try :
633636 dbname = str (self .dock .comboConnections .currentText ())
634637 db = self .actionsDb [dbname ].connect ()
@@ -726,6 +729,7 @@ def exportMerged(self):
726729 'Following argument is not specified.\n ' + ',' .join (empties ))
727730 return
728731
732+ db = None
729733 try :
730734 dbname = str (self .dock .comboConnections .currentText ())
731735 db = self .actionsDb [dbname ].connect ()
@@ -1111,6 +1115,7 @@ def findNearestLink(self, args, pt):
11111115 distance = self .iface .mapCanvas ().getCoordinateTransform ().mapUnitsPerPixel () * self .FIND_RADIUS
11121116 rect = QgsRectangle (pt .x () - distance , pt .y () - distance , pt .x () + distance , pt .y () + distance )
11131117 canvasCrs = Utils .getDestinationCrs (self .iface .mapCanvas ())
1118+ db = None
11141119 try :
11151120 dbname = str (self .dock .comboConnections .currentText ())
11161121 db = self .actionsDb [dbname ].connect ()
0 commit comments