From: or3st3s Date: Tue, 2 Oct 2007 12:12:52 +0000 (+0000) Subject: Merge /home/luca/pymin X-Git-Url: https://git.llucax.com/software/pymin.git/commitdiff_plain/031a757fb7b600a9015d018011cc7b135d7c8627?hp=-c Merge /home/luca/pymin Conflicts: config.py services/__init__.py --- 031a757fb7b600a9015d018011cc7b135d7c8627 diff --combined config.py index 1ae766d,9b0932d..f135b23 --- a/config.py +++ b/config.py @@@ -10,15 -10,15 +10,18 @@@ def test_func(*args) routes = dict \ ( -- test = test_func, dhcp = DhcpHandler( pickle_dir = 'var/lib/pymin/pickle/dhcp', config_dir = 'var/lib/pymin/config/dhcp', ), + dns = DnsHandler( + pickle_dir = 'var/lib/pymin/pickle/dns', + config_dir = 'var/lib/pymin/config/dns', - ) ++ ), + firewall = FirewallHandler( + pickle_dir = 'var/lib/pymin/pickle/firewall', + config_dir = 'var/lib/pymin/config/firewall', + ), ) bind_addr = \ diff --combined pymindaemon.py index ae86197,f3f45fb..b440c52 --- a/pymindaemon.py +++ b/pymindaemon.py @@@ -70,11 -70,11 +70,11 @@@ class PyminDaemon(eventloop.EventLoop) response = u'ERROR ' except Exception, e: import traceback - result = u'Internal server error' + result = u'Internal server error\n' traceback.print_exc() # TODO logging! response = u'ERROR ' if result is None: - response += u'0' + response += u'0\n' else: response += u'%d\n%s' % (len(result), result) self.file.sendto(response, addr) @@@ -88,13 -88,11 +88,11 @@@ if __name__ == '__main__': - from dispatcher import handler - - @handler + @handler(u"Print all the arguments, return nothing.") def test_handler(*args): print 'test:', args - @handler + @handler(u"Echo the message passed as argument.") def echo_handler(message): print 'echo:', message return message diff --combined services/__init__.py index 0572631,c9ec9b3..e1a505d --- a/services/__init__.py +++ b/services/__init__.py @@@ -1,5 -1,5 +1,6 @@@ # vim: set encoding=utf-8 et sw=4 sts=4 : from services.dhcp import DhcpHandler +from services.dns import DnsHandler + from services.firewall import FirewallHandler