delete app info from local db

def delete_app_info(app_id):
    """
    delete app info from local db
    """
    try:
        conn = get_conn()
        c = conn.cursor()
        c.execute("DELETE FROM container WHERE app_id='{0}'".format(app_id))
        c.execute("DELETE FROM app WHERE id='{0}'".format(app_id))
        conn.commit()
        #print 'clear old app %s in db succeed!' % app_id
    except Exception, e:
        raise RuntimeError('clear old app %s in db failed! %s' % (app_id,e))