stream2chromecast.py 文件源码

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

项目:CodeLabs 作者: TheIoTLearningInitiative 项目源码 文件源码
def do_GET(self):

        query = self.path.split("?",1)[-1]
        filepath = urllib.unquote_plus(query)

        self.suppress_socket_error_report = None

        self.send_headers(filepath)       

        print "sending data"      
        try: 
            self.write_response(filepath)
        except socket.error, e:     
            if isinstance(e.args, tuple):
                if e[0] in (errno.EPIPE, errno.ECONNRESET):
                   print "disconnected"
                   self.suppress_socket_error_report = True
                   return

            raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号