This is the mistake, no? line 675 of src/tlib/msn.py :
handler = getattr(self, "handle_%s" % cmd.upper(), None)
if handler:
try: handler(params.split(' '))
Maybe the splitting is wrong.
Gonzalo Barrio.
Gonzalo Barrio wrote:
>I see that one user has problems to login. I don't know if it was
>working before, but I think...
>
>Here es the exception, it occurs exactly in login, so it never login:
>
>09/07/05 - 05:33:26 - LegacyConnection: "[EMAIL PROTECTED]" - loggedIn()
>09/07/05 - 05:33:26 - NotificationClient: "[EMAIL PROTECTED]"
>authenticated with MSN servers
>09/07/05 - 05:33:27 - Traceback (most recent call last):
>09/07/05 - 05:33:27 - File
>"/usr/lib/python2.3/site-packages/twisted/python/log.py", line 56, in
>callWithLogger
>09/07/05 - 05:33:27 - return callWithContext({"system": lp}, func,
>*args, **kw)
>09/07/05 - 05:33:27 - File
>"/usr/lib/python2.3/site-packages/twisted/python/log.py", line 41, in
>callWithContext
>09/07/05 - 05:33:27 - return context.call({ILogContext: newCtx},
>func, *args, **kw)
>09/07/05 - 05:33:27 - File
>"/usr/lib/python2.3/site-packages/twisted/python/context.py", line 52,
>in callWithContext
>09/07/05 - 05:33:27 - return
>self.currentContext().callWithContext(ctx, func, *args, **kw)
>09/07/05 - 05:33:27 - File
>"/usr/lib/python2.3/site-packages/twisted/python/context.py", line 31,
>in callWithContext
>09/07/05 - 05:33:27 - return func(*args,**kw)
>09/07/05 - 05:33:27 - --- <exception caught here> ---
>09/07/05 - 05:33:27 - File
>"/usr/lib/python2.3/site-packages/twisted/internet/selectreactor.py",
>line 139, in _doReadOrWrite
>09/07/05 - 05:33:27 - why = getattr(selectable, method)()
>09/07/05 - 05:33:27 - File
>"/usr/lib/python2.3/site-packages/twisted/internet/tcp.py", line 351, in
>doRead
>09/07/05 - 05:33:27 - return self.protocol.dataReceived(data)
>09/07/05 - 05:33:27 - File
>"/usr/lib/python2.3/site-packages/twisted/protocols/basic.py", line 221,
>in dataReceived
>09/07/05 - 05:33:27 - why = self.lineReceived(line)
>09/07/05 - 05:33:27 - File
>"/opt/jabber/usr/src/PyTransports/PyMSNt-0.10-dev-4/src/tlib/msn.py",
>line 675, in lineReceived
>09/07/05 - 05:33:27 - try: handler(params.split(' '))
>09/07/05 - 05:33:27 - File
>"/opt/jabber/usr/src/PyTransports/PyMSNt-0.10-dev-4/src/tlib/msn.py",
>line 1022, in handle_LST
>09/07/05 - 05:33:27 - userGuid = getVal(params[2])
>09/07/05 - 05:33:27 - File
>"/opt/jabber/usr/src/PyTransports/PyMSNt-0.10-dev-4/src/tlib/msn.py",
>line 158, in getVal
>09/07/05 - 05:33:27 - return inp.split('=')[1]
>09/07/05 - 05:33:27 - exceptions.IndexError: list index out of range
>
>
>I see a little more and see that if I am correct this is bad:
>here is the function:
> def handle_LST(self, params):
> # support no longer exists for manually
> # requesting lists - why do I feel cleaner now?
> if self._getState() != 'SYNC': return
> userHandle = ""
> screenName = ""
> userGuid = ""
> if 2 < len(params) <= 5:
> print 'Los params malditos son: 0: %s 1: %s 2: %s 3: %s' %
>(params[0],params[1],params[2],params[3])
> userHandle = getVal(params[0])
> screenName = unquote(getVal(params[1]))
> userGuid = getVal(params[2])
> lists = int(params[3])
> elif len(params) == 2:
> lists = int(params[1])
> else:
> raise MSNProtocolError, "Unknown LST " + str(params) # debug
>
>Is missed the check if len(params) is exactly 4 so int(params[3]) raise
>an indexError.
>
>James ?
>
>
>_______________________________________________
>py-transports mailing list
>[email protected]
>http://www.modevia.com/cgi-bin/mailman/listinfo/py-transports
>
>
>