]> mj.ucw.cz Git - eval.git/commitdiff
Fix dummy extension
authorTomas Gavenciak <gavento@ucw.cz>
Sat, 18 Sep 2010 07:30:53 +0000 (09:30 +0200)
committerTomas Gavenciak <gavento@ucw.cz>
Sat, 18 Sep 2010 07:32:20 +0000 (09:32 +0200)
t/moe/exts/dummy.py

index eef59bd5503eadef3f839ab21a344a5ad9763d55..a0e2dab0d4cf33fef786a84e3f50eec19ef00548 100644 (file)
@@ -7,16 +7,16 @@ Adds several info-printing hooks to both pipelines.
 
 def init(e):
       
-      def hook_m_0:
-         e.log.info('Hey! It\'s me, the dummy extension in your main pipeline! (at time 0)')
-      e.main_pipeline.insert(hook_m_0, 'exts.dummy.hook_m_0', 0)
-      
-      def hook_m_79:
-         e.log.info('Me, the dummy extension, requies no cleanup! (at time 79)')
-      e.main_pipeline.insert(hook_m_79, 'exts.dummy.hook_m_79', 79) 
-      
-      def hook_t_42:
-         t = 'It\'s test %s and the dummy extension did nothing! (at time 42)' % e['TEST']
-         e.log.info(t)
-         e.log.user.info(t)
-      e.test_pipeline.insert(hook_t_42, 'exts.dummy.hook_t_42', 42) 
+    def hook_m_0(self):
+       e.log.info('Hey! It\'s me, the dummy extension in your main pipeline! (at time 0)')
+    e.main_pipe.insert(hook_m_0, 'exts.dummy.hook_m_0', 0)
+    
+    def hook_m_79(self):
+       e.log.info('Me, the dummy extension, requies no cleanup! (at time 79)')
+    e.main_pipe.insert(hook_m_79, 'exts.dummy.hook_m_79', 79) 
+    
+    def hook_t_42(self):
+       t = 'It\'s test %s and the dummy extension did nothing! (at time 42)' % e['TEST']
+       e.log.info(t)
+       e.log.user.info(t)
+    e.test_pipe.insert(hook_t_42, 'exts.dummy.hook_t_42', 42)