216 try: |
218 try: |
217 f = open(fname, 'rb') |
219 f = open(fname, 'rb') |
218 self.stats = pickle.load(f) |
220 self.stats = pickle.load(f) |
219 f.close() |
221 f.close() |
220 except (EnvironmentError, pickle.PickleError): |
222 except (EnvironmentError, pickle.PickleError): |
221 QMessageBox.critical(None, |
223 E5MessageBox.critical(self, |
222 self.trUtf8("Loading Profiling Data"), |
224 self.trUtf8("Loading Profiling Data"), |
223 self.trUtf8("""<p>The profiling data could not be""" |
225 self.trUtf8("""<p>The profiling data could not be""" |
224 """ read from file <b>{0}</b>.</p>""") |
226 """ read from file <b>{0}</b>.</p>""") |
225 .format(fname)) |
227 .format(fname)) |
226 self.close() |
228 self.close() |