server.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:radio-server 作者: ernitron 项目源码 文件源码
def getradio(id) :
    db = cherrypy.session['database']
    if id.isdigit() :
        sql = "select radio, genre, url from Radio where id=%s" % id
    else:
        sql = "select radio, genre, url from Radio where url=%s" % id
    try:
        con = lite.connect( db )
        cur = con.cursor()
        cur.execute(sql)
    except:
        rows = [('Not Found', '', '')]

    rows = cur.fetchone()
    if rows == None:
        rows = ('Not Found', '', '')

    con.close()

    return rows
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号