This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author showme1949
Recipients
Date 2003-06-28.09:30:21
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=811410


OK, I saw this problem pretty in several programs (mine or
others). So I deed some search, here is a log that shown
self._line_consumed, self._line_left, self._line and
self._line_offset with bittorrent.

It is pretty obvious when the assert happens, we have a empty
self._line before we even start to read. Maybe because the
other end closed on us without sending any data.

A suggusted fix is to append 'and len(self._line) != 0'  to
the end of assert.
-------------- My log on the assert -------
==== line_consumeed, line_left ===
0
0

0
=== self._line, line_offset ===
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.2/threading.py", line 414, in
__bootstrap
    self.run()
  File "/usr/lib/python2.2/threading.py", line 402, in run
    apply(self.__target, self.__args, self.__kwargs)
  File
"/usr/lib/python2.2/site-packages/BitTorrent/Rerequester.py",
line 76, in rer
equest
    r = h.read()
  File "/usr/lib/python2.2/httplib.py", line 1148, in read
    assert not self._line_consumed and self._line_left
AssertionError
History
Date User Action Args
2007-08-23 14:09:58adminlinkissue666219 messages
2007-08-23 14:09:58admincreate