From 0b5ebe2e1b3becfd57c15dc3d585ffcd22b47076 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Wed, 2 May 2007 17:39:28 +0000 Subject: Merged work on plugins support, including the possibility to wrap configuration sections. --- RepSys/plugins/sample.py.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 RepSys/plugins/sample.py.txt (limited to 'RepSys/plugins/sample.py.txt') 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 ", + "ceeclano": "Ceeclano Algumacoisa ", + "beltrano": "Beltrano Bla "} + if walk: + return d.items() + + return d.get(option, default) + +config.wrap("users", handler=users_wrapper) -- cgit v1.2.1