diff getan/backend.py @ 146:bb70dde875fd

Always fail if an entry couldn't be loaded Never catch all exceptions. Only specific ones.
author Björn Ricks <bjoern.ricks@intevation.de>
date Tue, 13 Nov 2012 13:13:28 +0100
parents 9e853f9e63ad
children 83ba64c9a51e
line wrap: on
line diff
--- a/getan/backend.py	Tue Nov 13 13:12:12 2012 +0100
+++ b/getan/backend.py	Tue Nov 13 13:13:28 2012 +0100
@@ -153,14 +153,11 @@
 
             entries = []
             while True:
-                try:
-                    row = cur.fetchone()
+                row = cur.fetchone()
 
-                    if not row:
-                        break
-                    entries.append(Entry(*row))
-                except:
-                    logger.warn("found invalid entry.")
+                if not row:
+                    break
+                entries.append(Entry(*row))
 
             logger.debug("Found %i entries that belong to project '%i'"
                          % (len(entries), project_id))
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)