File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 4040exectime = {}
4141
4242for branch in branches :
43- cursor .execute ("SELECT date FROM [%s] ORDER BY date DESC LIMIT 1" % branch )
44- v = cursor .fetchone ()[0 ]
43+ try :
44+ cursor .execute ("SELECT date FROM [%s] ORDER BY date DESC LIMIT 1" % branch )
45+ one = cursor .fetchone ()
46+ if one == None :
47+ print ("No such table '%s'; specify it using --branch=XXX when running test.py" % branch )
48+ # ignore this table and continue
49+ branches .remove (branch )
50+ continue
51+ else :
52+ v = one [0 ]
53+ except :
54+ print ("No such table '%s'; specify it using --branch=XXX when running test.py" % branch )
55+ # ignore this table and continue
56+ branches .remove (branch )
57+ continue
58+
4559 dates_str [branch ] = str (datetime .datetime .fromtimestamp (v ).strftime ('%Y-%m-%d %H:%M:%S' ))
4660 cursor .execute ('''CREATE INDEX IF NOT EXISTS [idx_%s_date] ON [%s](date)''' % (branch ,branch ))
4761
You can’t perform that action at this time.
0 commit comments