Skip to content
Snippets Groups Projects
  1. Mar 11, 2014
    • W. Trevor King's avatar
      irkerd: Add InvalidRequest and use it to flatten Irker.handle() · aae700b1
      W. Trevor King authored
      The old implementation had several instances of logic like this:
      
        if exception_condition:
            self.logerr("invalid request")
        else:
            # continue_processing
      
      This increases nesting after each round of exception checking, and
      makes the logic of the whole function harder to follow.  This commit
      replaces that logic with:
      
        try:
            if exception_condition:
                raise InvalidRequest("invalid request")
            # continue peocessing
        except InvalidRequest, e:
            self.logerr(str(e))
      
      Because the guts of the handle() function are already inside a
      try/except block, we can add our except clause to the existing block,
      and now exception checks don't increase nesting at all.
      
      The exception to this global try/except block is the 'URL has
      unexpected type' error, where we do want a local try/except block
      inside the channel loop.  That way we get both errors about invalid
      URLs and continue to attempt valid URLs.  This matches the existing
      logic for this check, but conflicts with the current target.valid
      check (which doesn't log an error and does stop processing of further
      channels).
      aae700b1
    • W. Trevor King's avatar
      irkerd: Store less state in IRCServerConnection.connect() · 9a53ff42
      W. Trevor King authored
      We will never need the connection-time port, server_address, username,
      ircname, or password again, so don't store them.  We *do* need server
      and real_server_name for Event handling, so keep them around.
      9a53ff42
  2. Feb 04, 2014
  3. Dec 25, 2013
  4. Dec 04, 2013
  5. Dec 03, 2013
  6. Dec 02, 2013
  7. Dec 01, 2013
    • Antoine Beaupré's avatar
      fix crash after introduction of immediate mode · fc36200e
      Antoine Beaupré authored
      this fixes the following backtrace:
      
      Exception happened during processing of request from ('127.0.0.1', 41192)
      Traceback (most recent call last):
        File /usr/lib/python2.7/SocketServer.py, line 295, in _handle_request_noblock
          self.process_request(request, client_address)
        File /usr/lib/python2.7/SocketServer.py, line 321, in process_request
          self.finish_request(request, client_address)
        File /usr/lib/python2.7/SocketServer.py, line 334, in finish_request
          self.RequestHandlerClass(request, client_address, self)
        File /usr/lib/python2.7/SocketServer.py, line 649, in __init__
          self.handle()
        File ./irkerd, line 820, in handle
          irker.handle(line.strip())
        File ./irkerd, line 786, in handle
          self.servers[target.server()].dispatch(target.channel, message, target.key, quit_after=quit_after)
        File ./irkerd, line 641, in dispatch
          eligibles[0].enqueue(channel, message, key)
      TypeError: enqueue() takes exactly 5 arguments (4 given)
      
      when running: ./irk irker-test test
      fc36200e
    • Eric S. Raymond's avatar
      Version bump for 2.3 release. · b2f0aa40
      Eric S. Raymond authored
      b2f0aa40
  8. Nov 30, 2013
  9. Nov 29, 2013
  10. Nov 27, 2013
  11. Nov 26, 2013
  12. Nov 16, 2013
  13. Oct 23, 2013
  14. Oct 21, 2013
  15. Oct 20, 2013
  16. Oct 18, 2013
Loading