eric6/Plugins/VcsPlugins/vcsGit/GitDiffDialog.py

changeset 7836
2f0d208b8137
parent 7785
9978016560ec
child 7923
91e843545d9a
equal deleted inserted replaced
7835:0835ed67714b 7836:2f0d208b8137
341 eol = e5App().getObject("Project").getEolString() 341 eol = e5App().getObject("Project").getEolString()
342 try: 342 try:
343 with open(fname, "w", encoding="utf-8", newline="") as f: 343 with open(fname, "w", encoding="utf-8", newline="") as f:
344 f.write(eol.join(self.contents2.toPlainText().splitlines())) 344 f.write(eol.join(self.contents2.toPlainText().splitlines()))
345 f.write(eol) 345 f.write(eol)
346 except IOError as why: 346 except OSError as why:
347 E5MessageBox.critical( 347 E5MessageBox.critical(
348 self, self.tr('Save Diff'), 348 self, self.tr('Save Diff'),
349 self.tr( 349 self.tr(
350 '<p>The patch file <b>{0}</b> could not be saved.' 350 '<p>The patch file <b>{0}</b> could not be saved.'
351 '<br>Reason: {1}</p>') 351 '<br>Reason: {1}</p>')

eric ide

mercurial