equal
deleted
inserted
replaced
25 |
25 |
26 |
26 |
27 from __future__ import absolute_import |
27 from __future__ import absolute_import |
28 import os |
28 import os |
29 import re |
29 import re |
|
30 from builtins import str as text |
|
31 |
30 import util.paths as paths |
32 import util.paths as paths |
31 |
|
32 from xmlclass import GenerateParserFromXSD |
33 from xmlclass import GenerateParserFromXSD |
33 |
34 |
34 from CodeFileTreeNode import CodeFile |
35 from CodeFileTreeNode import CodeFile |
35 from py_ext.PythonEditor import PythonEditor |
36 from py_ext.PythonEditor import PythonEditor |
36 |
37 |
72 self.CodeFile.globals.setanyText(python_code.getanyText()) |
73 self.CodeFile.globals.setanyText(python_code.getanyText()) |
73 os.remove(filepath) |
74 os.remove(filepath) |
74 self.CreateCodeFileBuffer(False) |
75 self.CreateCodeFileBuffer(False) |
75 self.OnCTNSave() |
76 self.OnCTNSave() |
76 except Exception as exc: |
77 except Exception as exc: |
77 error = unicode(exc) |
78 error = text(exc) |
78 |
79 |
79 if error is not None: |
80 if error is not None: |
80 self.GetCTRoot().logger.write_error( |
81 self.GetCTRoot().logger.write_error( |
81 _("Couldn't import old %s file.") % self.CTNName()) |
82 _("Couldn't import old %s file.") % self.CTNName()) |
82 |
83 |