4676ce352d0ae6aeb190b29fac488d57e9c05f35
[matthijs/projects/backupninja.git] / src / lib / backupninja / handlers / test.py
1 # -*- mode: python; sh-basic-offset: 4; indent-tabs-mode: nil; -*-
2 # vim: set filetype=python sw=4 sts=4 expandtab autoindent:
3 #
4 #    Backupninja python reimplementation, based on original backupninja program
5 #    by riseup.net.
6 #    Copyright (C) 2010  Matthijs Kooijman <matthijs@stdin.nl>
7 #
8 #    This program is free software; you can redistribute it and/or modify
9 #    it under the terms of the GNU General Public License as published by
10 #    the Free Software Foundation; either version 2 of the License, or
11 #    (at your option) any later version.
12 #
13 #    This program is distributed in the hope that it will be useful,
14 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #    GNU General Public License for more details.
17 #
18 #    You should have received a copy of the GNU General Public License along
19 #    with this program; if not, write to the Free Software Foundation, Inc.,
20 #    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
22 """ Testing handler that logs a configurable message """
23
24 import logging as log
25
26 from backupninja.handlers import Handler
27
28 class TestHandler(Handler):
29     def run(self):
30         log.info(self.conf.get('main', 'message'))
31         
32 handler = TestHandler