equal
deleted
inserted
replaced
11 |
11 |
12 from __future__ import absolute_import |
12 from __future__ import absolute_import |
13 import os |
13 import os |
14 import shutil |
14 import shutil |
15 import csv |
15 import csv |
|
16 from builtins import str as text |
|
17 |
16 from lxml import etree |
18 from lxml import etree |
17 |
|
18 import wx |
19 import wx |
19 |
20 |
20 from xmlclass import * |
21 from xmlclass import * |
21 |
22 |
22 from ConfigTreeNode import XSDSchemaErrorMessage |
23 from ConfigTreeNode import XSDSchemaErrorMessage |
225 self.modules_infos, error = EtherCATInfoParser.LoadXMLString(xmlfile.read()) |
226 self.modules_infos, error = EtherCATInfoParser.LoadXMLString(xmlfile.read()) |
226 if error is not None: |
227 if error is not None: |
227 self.GetCTRoot().logger.write_warning( |
228 self.GetCTRoot().logger.write_warning( |
228 XSDSchemaErrorMessage % (filepath + error)) |
229 XSDSchemaErrorMessage % (filepath + error)) |
229 except Exception as exc: |
230 except Exception as exc: |
230 self.modules_infos, error = None, unicode(exc) |
231 self.modules_infos, error = None, text(exc) |
231 xmlfile.close() |
232 xmlfile.close() |
232 |
233 |
233 if self.modules_infos is not None: |
234 if self.modules_infos is not None: |
234 vendor = self.modules_infos.getVendor() |
235 vendor = self.modules_infos.getVendor() |
235 |
236 |