diff --git a/report.py b/report.py index 00e3568..cad20c8 100755 --- a/report.py +++ b/report.py @@ -44,21 +44,15 @@ missing_branches = [] for branch in branches: - try: + one = None + if db.tableExists(branch): cursor.execute("SELECT date FROM %s ORDER BY date DESC LIMIT 1" % db.quote(branch)) one = cursor.fetchone() - if one == None: - print("No such table '%s'; specify it using --branch=XXX when running test.py" % branch) - # ignore this table and continue - missing_branches.append(branch) - continue - else: - v = one[0] - except: + if one is None: print("No such table '%s'; specify it using --branch=XXX when running test.py" % branch) - # ignore this table and continue missing_branches.append(branch) continue + v = one[0] dates_str[branch] = str(datetime.datetime.fromtimestamp(v).strftime('%Y-%m-%d %H:%M:%S')) db.createDateIndex(branch)