eric6/Plugins/VcsPlugins/vcsMercurial/HisteditExtension/HgHisteditPlanEditor.py

changeset 7836
2f0d208b8137
parent 7785
9978016560ec
child 7923
91e843545d9a
equal deleted inserted replaced
7835:0835ed67714b 7836:2f0d208b8137
103 populate the dialog. 103 populate the dialog.
104 """ 104 """
105 try: 105 try:
106 with open(self.__fileName, "r") as f: 106 with open(self.__fileName, "r") as f:
107 txt = f.read() 107 txt = f.read()
108 except (IOError, OSError) as err: 108 except OSError as err:
109 E5MessageBox.critical( 109 E5MessageBox.critical(
110 self, 110 self,
111 self.tr("Edit Plan"), 111 self.tr("Edit Plan"),
112 self.tr("""<p>The file <b>{0}</b> could not be read.</p>""" 112 self.tr("""<p>The file <b>{0}</b> could not be read.</p>"""
113 """<p>Reason: {1}</p>""").format( 113 """<p>Reason: {1}</p>""").format(
238 """ 238 """
239 text = self.__assembleEditPlan() 239 text = self.__assembleEditPlan()
240 try: 240 try:
241 with open(self.__fileName, "w") as f: 241 with open(self.__fileName, "w") as f:
242 f.write(text) 242 f.write(text)
243 except (IOError, OSError) as err: 243 except OSError as err:
244 E5MessageBox.critical( 244 E5MessageBox.critical(
245 self, 245 self,
246 self.tr("Edit Plan"), 246 self.tr("Edit Plan"),
247 self.tr("""<p>The file <b>{0}</b> could not be read.</p>""" 247 self.tr("""<p>The file <b>{0}</b> could not be read.</p>"""
248 """<p>Reason: {1}</p>""").format( 248 """<p>Reason: {1}</p>""").format(

eric ide

mercurial