b = { k : k for k in a.keys()}
@contextmanager
def _new_connection(self):
conn = None
try:
conn = sqlite3.connect(self.db_file)
conn.cursor().execute(CREATE_TABLE % 'tasks (task_id, cc_id, expired)')
conn.cursor().execute(CREATE_TABLE % 'task_actions (task_id, action)')
conn.commit()
yield conn
except sqlite3.DatabaseError as e:
pass
finally:
if conn:
conn.close()