]> git.llucax.com Git - software/pymin.git/blobdiff - pymindaemon.py
Change "var" for "attr" where it refer to an object attribute.
[software/pymin.git] / pymindaemon.py
index ec15356a7ab89507b5be77312088d709a05c2200..b440c5279f9b015a0beb7b5882dfaeb0d5403ce3 100644 (file)
@@ -74,7 +74,7 @@ class PyminDaemon(eventloop.EventLoop):
             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 @@ class PyminDaemon(eventloop.EventLoop):
 
 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