aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/plugins/sample.py.txt
blob: 9877f3c8ca37aeda2e987642190509cd4a4e8a8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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)