Skip to content

Config error handling #4

@photm5

Description

@photm5

If you forget to supply a nick in config.json, a stacktrace like this will
be shown:

  File "/home/shakmar/workspaces/python/pybot/pybot/irc.py", line 65, in run
    self._connect ()
  File "/home/shakmar/workspaces/python/pybot/pybot/irc.py", line 93, in _connect
    self._register ()
  File "/home/shakmar/workspaces/python/pybot/pybot/irc.py", line 101, in _register
    self.send_event ( nick_event )
  File "/home/shakmar/workspaces/python/pybot/pybot/irc.py", line 180, in send_event
    self._socket.send ( "%s\r\n" % event.signal )
  File "/home/shakmar/workspaces/python/pybot/pybot/irc.py", line 268, in signal
    if " " in arg:
TypeError: argument of type 'NoneType' is not iterable

A nicely formatted error message would be preferrable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions