equal
deleted
inserted
replaced
21 # You should have received a copy of the GNU General Public License |
21 # You should have received a copy of the GNU General Public License |
22 # along with this program; if not, write to the Free Software |
22 # along with this program; if not, write to the Free Software |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
24 |
24 |
25 |
25 |
26 |
|
27 import os |
26 import os |
28 import re |
27 import re |
29 import traceback |
28 import traceback |
30 from builtins import str as text |
|
31 from copy import deepcopy |
29 from copy import deepcopy |
32 |
30 |
33 from lxml import etree |
31 from lxml import etree |
34 from xmlclass import GenerateParserFromXSDstring |
32 from xmlclass import GenerateParserFromXSDstring |
35 |
33 |
126 if error is not None: |
124 if error is not None: |
127 (fname, lnum, src) = ((self.CODEFILE_NAME,) + error) |
125 (fname, lnum, src) = ((self.CODEFILE_NAME,) + error) |
128 self.GetCTRoot().logger.write_warning(XSDSchemaErrorMessage.format(a1=fname, a2=lnum, a3=src)) |
126 self.GetCTRoot().logger.write_warning(XSDSchemaErrorMessage.format(a1=fname, a2=lnum, a3=src)) |
129 self.CreateCodeFileBuffer(True) |
127 self.CreateCodeFileBuffer(True) |
130 except Exception as exc: |
128 except Exception as exc: |
131 msg = _("Couldn't load confnode parameters {a1} :\n {a2}").format(a1=self.CTNName(), a2=text(exc)) |
129 msg = _("Couldn't load confnode parameters {a1} :\n {a2}").format(a1=self.CTNName(), a2=str(exc)) |
132 self.GetCTRoot().logger.write_error(msg) |
130 self.GetCTRoot().logger.write_error(msg) |
133 self.GetCTRoot().logger.write_error(traceback.format_exc()) |
131 self.GetCTRoot().logger.write_error(traceback.format_exc()) |
134 raise Exception |
132 raise Exception |
135 else: |
133 else: |
136 self.CodeFile = self.CodeFileParser.CreateRoot() |
134 self.CodeFile = self.CodeFileParser.CreateRoot() |