eric6/PipInterface/PipFreezeDialog.py

changeset 7785
9978016560ec
parent 7780
41420f82c0ac
child 7824
096b3ebc1409
child 7836
2f0d208b8137
equal deleted inserted replaced
7784:3257703e10c5 7785:9978016560ec
194 """ to overwrite it?""").format(fileName)) 194 """ to overwrite it?""").format(fileName))
195 if not ok: 195 if not ok:
196 return 196 return
197 197
198 try: 198 try:
199 f = open(fileName, "w") 199 with open(fileName, "w") as f:
200 f.write(self.requirementsEdit.toPlainText()) 200 f.write(self.requirementsEdit.toPlainText())
201 f.close()
202 except (OSError, IOError) as err: 201 except (OSError, IOError) as err:
203 E5MessageBox.critical( 202 E5MessageBox.critical(
204 self, 203 self,
205 self.tr("Generate Requirements"), 204 self.tr("Generate Requirements"),
206 self.tr("""<p>The requirements could not be written""" 205 self.tr("""<p>The requirements could not be written"""

eric ide

mercurial