equal
deleted
inserted
replaced
23 import re |
23 import re |
24 import codecs |
24 import codecs |
25 |
25 |
26 from cone.public import exceptions, utils, api, settings, rules, parsecontext |
26 from cone.public import exceptions, utils, api, settings, rules, parsecontext |
27 import _plugin_reader |
27 import _plugin_reader |
|
28 from cone.public.exceptions import NotFound |
|
29 |
28 |
30 |
29 debug = 0 |
31 debug = 0 |
30 """ |
32 """ |
31 Implementation specific settings can be overriden in the global impl_settings variable |
33 Implementation specific settings can be overriden in the global impl_settings variable |
32 """ |
34 """ |
145 self.impl_set = kwargs.get('impl_set', ImplSet()) |
147 self.impl_set = kwargs.get('impl_set', ImplSet()) |
146 |
148 |
147 #: Generation output elements as a list |
149 #: Generation output elements as a list |
148 self.generation_output = [] |
150 self.generation_output = [] |
149 |
151 |
150 #: possible log elemement |
152 #: possible log element |
151 self.log = [] |
153 self.log = [] |
152 self.log_file = "" |
154 self.log_file = "" |
153 |
155 |
154 def __getstate__(self): |
156 def __getstate__(self): |
155 state = self.__dict__ |
157 state = self.__dict__.copy() |
156 state['impl_data_dict'] = {} |
158 state['impl_data_dict'] = {} |
157 return state |
159 return state |
158 |
160 |
159 def eval(self, ast, expression, value, **kwargs): |
161 def eval(self, ast, expression, value, **kwargs): |
160 """ |
162 """ |
765 return tpl |
767 return tpl |
766 else: |
768 else: |
767 return (read_impl_from_location, |
769 return (read_impl_from_location, |
768 (self.ref, config, self.lineno)) |
770 (self.ref, config, self.lineno)) |
769 |
771 |
|
772 |
|
773 #def __getstate__(self): |
|
774 #state = self.__dict__ |
|
775 #state['configuration'] = self.configuration.path |
|
776 #return state |
|
777 |
|
778 #def __setstate__(self, dict): |
|
779 # path = dict['configuration'] |
|
780 # configuration = api.ConfigurationProxy(path) |
|
781 # self.__dict__.update(dict) |
|
782 # self.configuration = configuration |
770 |
783 |
771 def _dereference(self, ref): |
784 def _dereference(self, ref): |
772 """ |
785 """ |
773 Function for dereferencing a configuration ref to a value in the Implementation configuration context. |
786 Function for dereferencing a configuration ref to a value in the Implementation configuration context. |
774 """ |
787 """ |