local_favs = cur.execute(sql).fetchall() causes crasch when table favori...

local_favs = cur.execute(sql).fetchall() causes crasch when table favorites is empty and sql result is 0.

Error and solution is described here: http://stackoverflow.com/questions/13410982/attributeerror-long-object-has-no-attribute-fetchall