changeset 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 ccd47a2d37a6
children 8cc1f83d32ee
files getan/backend.py
diffstat 1 files changed, 4 insertions(+), 7 deletions(-) [+]
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)