Changeset 23:adc5b22efd7e in mailjam for mailjam/config.py


Ignore:
Timestamp:
May 22, 2012, 7:31:12 PM (12 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Added the first version of the CLI client, which implements a shell-like
interface where users can interact with a mailjam server.

This first versions adds no "big" features, but contains the basis to build
a complete shell interface (including history saving support, completion,
help for commands, etc)

Added a custom configuration file (conf/mailjam-cli.conf) for the CLI
client.

Added a new mailjam.config class (CLIClientConfig) that is used by the CLI
client to load its configuration file.

Updated the package information (setup.py, MANIFEST) to include the CLI
client data.

Modified the behaviour of the XMLRPC methods registered in the *XMLRPC classes
within the daemon module. Now instead of raising exceptions directly, they
catch such exceptions, returning only a string representation of the error
to the XMLRPC client. If there is no error, a nice "ok" message is returned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mailjam/config.py

    r20 r23  
    8989        return self.config[section]
    9090
     91
    9192class MTAClientConfig(DaemonConfig):
    9293    @property
     
    9798    def sections(self):
    9899        return ['server', 'archive']
     100
     101
     102class CLIClientConfig(DaemonConfig):
     103    @property
     104    def default_filename(self):
     105        return 'mailjam-cli.conf'
     106
     107    @property
     108    def sections(self):
     109        return ['server', 'archive', 'history']
    99110
    100111
Note: See TracChangeset for help on using the changeset viewer.