eric6/UI/InstallInfoDialog.py

changeset 7836
2f0d208b8137
parent 7810
f8afd2238723
child 7923
91e843545d9a
equal deleted inserted replaced
7835:0835ed67714b 7836:2f0d208b8137
92 self.installDateTimeLabel.setText( 92 self.installDateTimeLabel.setText(
93 self.__info["installed_on"] if self.__info["installed_on"] 93 self.__info["installed_on"] if self.__info["installed_on"]
94 else self.tr("unknown")) 94 else self.tr("unknown"))
95 95
96 self.__updateButton.setEnabled(bool(self.__info["exe"])) 96 self.__updateButton.setEnabled(bool(self.__info["exe"]))
97 except EnvironmentError as err: 97 except OSError as err:
98 E5MessageBox.critical( 98 E5MessageBox.critical(
99 self, 99 self,
100 self.tr("Load Install Information"), 100 self.tr("Load Install Information"),
101 self.tr("<p>The file containing the install information could" 101 self.tr("<p>The file containing the install information could"
102 " not be read.</p><p>Reason: {0}</p>""") 102 " not be read.</p><p>Reason: {0}</p>""")
181 try: 181 try:
182 with open(infoFileName, "w") as infoFile: 182 with open(infoFileName, "w") as infoFile:
183 json.dump(self.__info, infoFile, indent=2) 183 json.dump(self.__info, infoFile, indent=2)
184 self.__edited = False 184 self.__edited = False
185 self.editButton.setChecked(False) 185 self.editButton.setChecked(False)
186 except EnvironmentError as err: 186 except OSError as err:
187 E5MessageBox.critical( 187 E5MessageBox.critical(
188 self, 188 self,
189 self.tr("Save Install Information"), 189 self.tr("Save Install Information"),
190 self.tr("<p>The file containing the install information could" 190 self.tr("<p>The file containing the install information could"
191 " not be written.</p><p>Reason: {0}</p>""") 191 " not be written.</p><p>Reason: {0}</p>""")

eric ide

mercurial