Hi,
I started playing with pyfics, and the example code shown in the project's webpage produces an error if the provided FICS password is invalid:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line 48, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/usr/lib/python2.5/site-packages/twisted/python/log.py", line 33, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 59, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.5/site-packages/twisted/python/context.py", line 37, in callWithContext
return func(*args,**kw)
--- <exception caught here> ---
File "/usr/lib/python2.5/site-packages/twisted/internet/selectreactor.py", line 139, in _doReadOrWrite
why = getattr(selectable, method)()
File "/usr/lib/python2.5/site-packages/twisted/internet/tcp.py", line 362, in doRead
return self.protocol.dataReceived(data)
File "build/bdist.linux-i686/egg/pyfics/protocols.py", line 70, in dataReceived
File "build/bdist.linux-i686/egg/pyfics/protocols.py", line 91, in lineReceived
File "build/bdist.linux-i686/egg/pyfics/parser/ficsparser.py", line 146, in parse
File "/var/lib/python-support/python2.5/pyparsing.py", line 704, in parseString
loc, tokens = self._parse( instring.expandtabs(), 0 )
File "/var/lib/python-support/python2.5/pyparsing.py", line 591, in _parseNoCache
loc,tokens = self.parseImpl( instring, loc, doActions )
File "/var/lib/python-support/python2.5/pyparsing.py", line 1836, in parseImpl
ret = e._parse( instring, loc, doActions )
File "/var/lib/python-support/python2.5/pyparsing.py", line 620, in _parseNoCache
tokens = fn( instring, tokensStart, retTokens )
exceptions.TypeError: on_invalidpass() takes exactly 4 arguments (3 given)
Logged In: YES
user_id=431797
Originator: YES
The attached patch seems to fix the problem.
File Added: 1846756.patch
Patch