66from lml .plugin import PluginManager , PluginInfo
77from lml .loader import scan_plugins
88
9- from moban .hashstore import HashStore
9+ from moban .hashstore import HASH_STORE
1010from moban .extensions import JinjaFilterManager , JinjaTestManager
1111from moban .extensions import JinjaGlobalsManager
1212import moban .utils as utils
@@ -74,7 +74,6 @@ def __init__(self, template_dirs, context_dirs):
7474
7575 self .context = Context (context_dirs )
7676 self .template_dirs = template_dirs
77- self .hash_store = HashStore ()
7877 self .__file_count = 0
7978 self .__templated_count = 0
8079
@@ -95,7 +94,6 @@ def render_to_files(self, array_of_param_tuple):
9594 self ._render_with_finding_data_first (sta .data_file_index )
9695 else :
9796 self ._render_with_finding_template_first (sta .template_file_index )
98- self .hash_store .close ()
9997
10098 def report (self ):
10199 if self .__templated_count == 0 :
@@ -136,7 +134,7 @@ def _apply_template(self, template, data, output):
136134 rendered_content = template .render (** data )
137135 rendered_content = utils .strip_off_trailing_new_lines (rendered_content )
138136 rendered_content = rendered_content .encode ("utf-8" )
139- flag = self . hash_store .is_file_changed (
137+ flag = HASH_STORE .is_file_changed (
140138 output , rendered_content , template .filename
141139 )
142140 if flag :
0 commit comments