Comment 4 for bug 450951

Revision history for this message
In , Markus Korn (thekorn) wrote :

This issue has originally been reported by Marcelo Messias and others at Launchpad: https://launchpad.net/bugs/450951

The reported Tracebacks are looking like:

Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/papyon/msnp2p/session_manager.py", line 53, in <lambda>
    lambda tr, blob: self._on_blob_received(blob))
  File "/usr/lib/pymodules/python2.6/papyon/msnp2p/session_manager.py", line 164, in _on_blob_received
    session = self._sessions[session_id]
  File "/usr/lib/python2.6/weakref.py", line 54, in __getitem__
    o = self.data[key]()
KeyError: 1098564

The version of papyon used is 0.4.5

I had I quick look at the code, line 164 of session_manger.py makes no sense to me. If session is None, it is None because ._get_session() returned None, and this is because session_id was not found in the ._sessions dict.
What about replacing this line with "return None"?

Thanks,
Markus