ftplib: socket.error during/after LIST // ssl._sslobj.shutdown() / connection timed out

眉间皱痕 提交于 2019-12-04 15:47:31

We are also facing the same problem. inside SSL.PY we are geting error 0 exception

def unwrap(self):
    if self._sslobj:
        print "SSL Object Present"
        s = self._sslobj.shutdown()
        print "SSL Object Shoutdown"
        print "print s"
        print s
        self._sslobj = None
        return s
    else:
        raise ValueError("No SSL wrapper around " + str(self))

s = self._sslobj.shutdown() on this line its throwing exception. do you have nay update on this?

I modified the ftplib.py retrline method with below code

    if isinstance(conn, ssl.SSLSocket):
     conn.close()

its working with out any error. I don't know impact of this changes in other functionality

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!