diff python/ppci/recipe.py @ 355:c2ddc8a36f5e

Enabled optimization
author Windel Bouwman
date Fri, 14 Mar 2014 10:30:13 +0100
parents b8ad45b3a573
children 39bf68bf1891
line wrap: on
line diff
--- a/python/ppci/recipe.py	Thu Mar 13 18:59:06 2014 +0100
+++ b/python/ppci/recipe.py	Fri Mar 14 10:30:13 2014 +0100
@@ -12,19 +12,19 @@
 
 class RecipeLoader:
     """ Loads a recipe into a runner from a dictionary or file """
-    def __init__(self):
+    def __init__(self, runner):
+        self.runner = runner
         self.directive_handlers = {}
         for a in dir(self):
             if a.startswith('handle_'):
                 f = getattr(self, a)
                 self.directive_handlers[a[7:]] = f
 
-    def load_file(self, recipe_file, runner):
-        """ Loads a recipe dictionary into a task runner """
+    def load_file(self, recipe_file):
+        """ Loads a recipe dictionary from file """
         self.recipe_dir = os.path.abspath(os.path.dirname(recipe_file))
         with open(recipe_file, 'r') as f:
             recipe = yaml.load(f)
-        self.runner = runner
         self.load_dict(recipe)
 
     def relpath(self, filename):