python - pep381run broken when restart: httplib.ResponseNotReady -


i'm trying setup local pypi server. use pep381client synchronize official pypi server.

it works fine. today encountered problem: stop (by ctr+c) , restart , pep381run raise error following:

e:\tmp>pep381run.py pypi synchronizing obitools copying /packages/source/o/obitools/obitools-0.2.000.tar.gz copying /packages/source/o/obitools/obitools-0.2.002.tar.gz copying /packages/source/o/obitools/obitools-00.02.503.tar.gz copying /packages/source/o/obitools/obitools-00.02.500.tar.gz traceback (most recent call last):   file "d:\python27\scripts\pep381run.py", line 31, in <module>     state.synchronize()   file "d:\python27\lib\site-packages\pep381client\__init__.py", line 119, in synchronize     self._synchronize()   file "d:\python27\lib\site-packages\pep381client\__init__.py", line 159, in _synchronize     self.maybe_copy_file(project, file)   file "d:\python27\lib\site-packages\pep381client\__init__.py", line 237, in maybe_copy_file     r = h.getresponse()   file "d:\python27\lib\httplib.py", line 1033, in getresponse     raise responsenotready() httplib.responsenotready   

any idea ?

reminded question , after making dirty , desperate change code following:

def http():     global _conn     _conn = httplib.httpsconnection(pypi)      _conn.connect()     return _conn 

it works again.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -