237 """ |
237 """ |
238 filename1 = self.file1Picker.text() |
238 filename1 = self.file1Picker.text() |
239 try: |
239 try: |
240 with open(filename1, "r", encoding="utf-8") as f1: |
240 with open(filename1, "r", encoding="utf-8") as f1: |
241 lines1 = f1.readlines() |
241 lines1 = f1.readlines() |
242 except IOError: |
242 except OSError: |
243 E5MessageBox.critical( |
243 E5MessageBox.critical( |
244 self, |
244 self, |
245 self.tr("Compare Files"), |
245 self.tr("Compare Files"), |
246 self.tr( |
246 self.tr( |
247 """<p>The file <b>{0}</b> could not be read.</p>""") |
247 """<p>The file <b>{0}</b> could not be read.</p>""") |
250 |
250 |
251 filename2 = self.file2Picker.text() |
251 filename2 = self.file2Picker.text() |
252 try: |
252 try: |
253 with open(filename2, "r", encoding="utf-8") as f2: |
253 with open(filename2, "r", encoding="utf-8") as f2: |
254 lines2 = f2.readlines() |
254 lines2 = f2.readlines() |
255 except IOError: |
255 except OSError: |
256 E5MessageBox.critical( |
256 E5MessageBox.critical( |
257 self, |
257 self, |
258 self.tr("Compare Files"), |
258 self.tr("Compare Files"), |
259 self.tr( |
259 self.tr( |
260 """<p>The file <b>{0}</b> could not be read.</p>""") |
260 """<p>The file <b>{0}</b> could not be read.</p>""") |