]> git.llucax.com Git - software/pymin.git/commitdiff
Merge /home/luca/pymin
authoror3st3s <or3st3s@underworld.localdomain>
Tue, 2 Oct 2007 12:12:52 +0000 (12:12 +0000)
committeror3st3s <or3st3s@underworld.localdomain>
Tue, 2 Oct 2007 12:12:52 +0000 (12:12 +0000)
Conflicts:

config.py
services/__init__.py

1  2 
config.py
pymindaemon.py
services/__init__.py

diff --combined config.py
index 1ae766d6364568d40b888d904c79ee43c4d80c28,9b0932da5db699fd8e60418196bb176231c690b8..f135b23e20371cab8cc672d30c01ab16c4d1516b
+++ 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 ae86197e6912c1e828c911b7623827837965dcc1,f3f45fbd38d90581ffc01af351045c1c97a4e7e2..b440c5279f9b015a0beb7b5882dfaeb0d5403ce3
@@@ -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)
  
  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 0572631633e5e8cd3dc14312bf818a59bc8020e4,c9ec9b35df321e518cc4056abc2546a096273c23..e1a505d731ee970b9e69736c45e1473fcfb72445
@@@ -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