From e4916bc456adea322d4af28bf7c08efc3afd9909 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Tue, 6 Jul 2010 23:52:59 +0200 Subject: [PATCH] replace catchall except with an if --- pyfpdb/Database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index fe628cf4..381bde4d 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1985,9 +1985,9 @@ class Database: (tourney.siteId, tourney.tourNo)) result=cursor.fetchone() - try: + if len(result)==1: tourneyId = result[0] - except: + else: cursor.execute (self.sql.query['insertTourney'].replace('%s', self.sql.query['placeholder']), (tourney.tourneyTypeId, tourney.tourNo, tourney.entries, tourney.prizepool, tourney.startTime, tourney.endTime, tourney.tourneyName, None,