diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2007-05-02 17:39:28 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2007-05-02 17:39:28 +0000 |
commit | 0b5ebe2e1b3becfd57c15dc3d585ffcd22b47076 (patch) | |
tree | 7e434f732783b2398fdb44d01a1a61a9df5ca3d9 /RepSys/plugins/sample.py.txt | |
parent | 91700a68924f4b2e97a18f2c3787bd885c36640c (diff) | |
download | mgarepo-0b5ebe2e1b3becfd57c15dc3d585ffcd22b47076.tar mgarepo-0b5ebe2e1b3becfd57c15dc3d585ffcd22b47076.tar.gz mgarepo-0b5ebe2e1b3becfd57c15dc3d585ffcd22b47076.tar.bz2 mgarepo-0b5ebe2e1b3becfd57c15dc3d585ffcd22b47076.tar.xz mgarepo-0b5ebe2e1b3becfd57c15dc3d585ffcd22b47076.zip |
Merged work on plugins support, including the possibility to wrap
configuration sections.
Diffstat (limited to 'RepSys/plugins/sample.py.txt')
-rw-r--r-- | RepSys/plugins/sample.py.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/RepSys/plugins/sample.py.txt b/RepSys/plugins/sample.py.txt new file mode 100644 index 0000000..9877f3c --- /dev/null +++ b/RepSys/plugins/sample.py.txt @@ -0,0 +1,14 @@ +# Sample repsys plugin. In order to test it, rename to sample.py +# vim:ft=python +from RepSys import config + +def users_wrapper(section, option=None, default=None, walk=False): + d = {"foolano": "Foolano De Tal <foolano@bla.com>", + "ceeclano": "Ceeclano Algumacoisa <ceeclano@bli.com>", + "beltrano": "Beltrano Bla <beltrano@mail.ru>"} + if walk: + return d.items() + + return d.get(option, default) + +config.wrap("users", handler=users_wrapper) |