changeset 50:9dbb6ee443a4

don't forget to save before commit :-/
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 18 Mar 2011 16:30:56 +0100
parents 062ce001abd1
children 3f97954868e4
files getan/backend.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/getan/backend.py	Fri Mar 18 14:43:24 2011 +0100
+++ b/getan/backend.py	Fri Mar 18 16:30:56 2011 +0100
@@ -183,11 +183,13 @@
         if project is None:
             return
         cur = None
-        try
+        try:
             cur = self.con.cursor()
             cur.execute(INSERT_PROJECT, (project, key, description))
             self.con.commit()
             logger.debug("Added a new project '%s' into db" % project)
+        finally:
+            close(cur)
 
     def delete_entries(self, entries):
         if entries is None: return
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)