Issue #31 resolved fails to run

Anonymous created an issue

Running scripts/ with valid arguments causes a TypeError exception.

This is with python 2.6 (running on RedHat Enterprise 6).

For example:

$ python -p 7000 foobot somechannel

Traceback (most recent call last): File "", line 76, in <module> main() File "", line 63, in main connect_factory=ssl_factory, File "/usr/lib/python2.6/site-packages/irc/", line 35, in wrapper return method(self, args, *kwargs) File "/usr/lib/python2.6/site-packages/irc/", line 488, in connect self.socket = self.connect_factory(self.server_address) File "/usr/lib/python2.6/site-packages/irc/", line 60, in connect sock.bind(self.bind_address) File "<string>", line 1, in bind TypeError: getsockaddrarg: AF_INET address must be tuple, not function

Comments (2)

  1. Nick Raptis

    Confirmed on python 2.7 with identical traceback.

    Actually, the library is ok, it's that doesn't call irc.connection.Factory the right way.

    scripts/ line 56 calls

        ssl_factory = irc.connection.Factory(ssl.wrap_socket)

    when it should be

        ssl_factory = irc.connection.Factory(wrapper=ssl.wrap_socket)

    resulting in the wrapper being assigned to the bind_address

    Made a pull request with the fix

    Too bad it's only a one-liner :)

  2. Log in to comment