diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-01 11:55:16 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-04-01 11:55:16 -0700 |
commit | 51e31f57d870ae0d0b7892c9ecebb9626fbb1b3c (patch) | |
tree | 518dcf4d28d05e52df5999f81e5da2c007e4e816 /pystache | |
parent | 81c6a9c44e58c6ea5e4cea671be09cdd145119ee (diff) | |
download | pystache-51e31f57d870ae0d0b7892c9ecebb9626fbb1b3c.tar.gz |
Removed search_dirs from the SpecLoader constructor.
Diffstat (limited to 'pystache')
-rw-r--r-- | pystache/template_spec.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/pystache/template_spec.py b/pystache/template_spec.py index 83aebfd..ff4979b 100644 --- a/pystache/template_spec.py +++ b/pystache/template_spec.py @@ -122,8 +122,8 @@ class View(TemplateSpec): return renderer.render(template, self.context) -# TODO: get this class fully working with test cases, and then refactor -# and replace the View class. +# TODO: add test cases for this class, and then refactor while replacing the +# View class. class SpecLoader(object): """ @@ -131,15 +131,11 @@ class SpecLoader(object): """ - def __init__(self, search_dirs=None, loader=None): + def __init__(self, loader=None): if loader is None: loader = Loader() - if search_dirs is None: - search_dirs = [] - self.loader = loader - self.search_dirs = search_dirs def _find_relative(self, spec): """ @@ -175,7 +171,7 @@ class SpecLoader(object): if dir_path is None: # Then we need to search for the path. - path = locator.find_object(spec, self.search_dirs, file_name=file_name) + path = locator.find_object(spec, self.loader.search_dirs, file_name=file_name) else: obj_dir = locator.get_object_directory(spec) path = os.path.join(obj_dir, dir_path, file_name) |