def get_listbox_items(): global happenList try: happenList = sms.select_top_db() except SymbianError,e: if(e.errno == -1): sms.init_db() happenList = sms.select_top_db()
def init_db(): sms.init_db() items = get_listbox_items() appuifw.app.body.set_list(items) appuifw.note(u"init db succeeded")