def get_info(msg, info_type):
global is_match
get = {
InputType.TRACK: _get_track,
InputType.ALBUM: _get_album,
InputType.PLAYLIST: _get_playlist,
InputType.ARTIST: _get_artist,
}
is_match = False
try:
info = get[info_type](msg)
except:
tb = sys.exc_info()
print(tb[1])
print(traceback.print_tb(tb[2]))
return {'mode':ErrorType.SOMETHING_WRONG}
return info
评论列表
文章目录