Server.__init__

Server.__init__(config_file: str = None, pid_file_name: str = None)[source]

Initializes and runs the Server object. The constructor calls the config() method to read out the server attributes, and initializes the logger and the message parser. Finally, the method daemonize() tries to lock the PID file pid_file_name.

Parameters
  • config_file (str, optional) – Configuration file, default is None.

  • pid_file_name (str, optional) – If given, overrides the default PID file name.

Raises
  • configparser.Error – Configuration file error

  • LockError – The PID file could not be locked (see here).

  • OSError – Various socket errors, e.g. address or timeout