py_ext/PythonFileCTNMixin.py
changeset 2418 5587c490a070
parent 1902 2b7e2db31d81
child 2434 07f48018b6f5
equal deleted inserted replaced
2417:316ee9fff395 2418:5587c490a070
    71                 if error is None:
    71                 if error is None:
    72                     self.CodeFile.globals.setanyText(python_code.getanyText())
    72                     self.CodeFile.globals.setanyText(python_code.getanyText())
    73                     os.remove(filepath)
    73                     os.remove(filepath)
    74                     self.CreateCodeFileBuffer(False)
    74                     self.CreateCodeFileBuffer(False)
    75                     self.OnCTNSave()
    75                     self.OnCTNSave()
    76             except Exception, exc:
    76             except Exception as exc:
    77                 error = unicode(exc)
    77                 error = unicode(exc)
    78 
    78 
    79             if error is not None:
    79             if error is not None:
    80                 self.GetCTRoot().logger.write_error(
    80                 self.GetCTRoot().logger.write_error(
    81                     _("Couldn't import old %s file.") % self.CTNName())
    81                     _("Couldn't import old %s file.") % self.CTNName())