eric6/VirtualEnv/VirtualenvExecDialog.py

changeset 7836
2f0d208b8137
parent 7785
9978016560ec
child 7900
72b88fb20261
child 7924
8a96736d465e
equal deleted inserted replaced
7835:0835ed67714b 7836:2f0d208b8137
266 errtxt = self.errors.toPlainText() 266 errtxt = self.errors.toPlainText()
267 if errtxt: 267 if errtxt:
268 f.write("\n") 268 f.write("\n")
269 f.write(self.tr("Errors:\n")) 269 f.write(self.tr("Errors:\n"))
270 f.write(errtxt) 270 f.write(errtxt)
271 except (IOError, OSError) as err: 271 except OSError as err:
272 self.__logError( 272 self.__logError(
273 self.tr("""The logfile '{0}' could not be written.\n""" 273 self.tr("""The logfile '{0}' could not be written.\n"""
274 """Reason: {1}\n""").format(logFile, str(err))) 274 """Reason: {1}\n""").format(logFile, str(err)))
275 self.__logOutput(self.tr("Done.\n")) 275 self.__logOutput(self.tr("Done.\n"))
276 276
293 .format(script)) 293 .format(script))
294 294
295 try: 295 try:
296 with open(script, "w", encoding="utf-8") as f: 296 with open(script, "w", encoding="utf-8") as f:
297 f.write(txt) 297 f.write(txt)
298 except (IOError, OSError) as err: 298 except OSError as err:
299 self.__logError( 299 self.__logError(
300 self.tr("""The script file '{0}' could not be written.\n""" 300 self.tr("""The script file '{0}' could not be written.\n"""
301 """Reason: {1}\n""").format(script, str(err))) 301 """Reason: {1}\n""").format(script, str(err)))
302 self.__logOutput(self.tr("Done.\n")) 302 self.__logOutput(self.tr("Done.\n"))

eric ide

mercurial