aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/plugins/sample.py.txt
blob: 846cb6d5af903412fd0f715d87e7a96ce777bdc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Sample mgarepo plugin. In order to test it, rename to sample.py
# vim:ft=python
from MgaRepo 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)