589 # read the file and split it into textlines |
589 # read the file and split it into textlines |
590 try: |
590 try: |
591 text, encoding, hash = \ |
591 text, encoding, hash = \ |
592 Utilities.readEncodedFileWithHash(fn) |
592 Utilities.readEncodedFileWithHash(fn) |
593 lines = text.splitlines(True) |
593 lines = text.splitlines(True) |
594 except (UnicodeError, IOError): |
594 except (UnicodeError, IOError) as err: |
595 E5MessageBox.critical(self, |
595 E5MessageBox.critical(self, |
596 self.trUtf8("Replace in Files"), |
596 self.trUtf8("Replace in Files"), |
597 self.trUtf8( |
597 self.trUtf8( |
598 """<p>Could not read the file <b>{0}</b>.""" |
598 """<p>Could not read the file <b>{0}</b>.""" |
599 """ Skipping it.</p><p>Reason: {1}</p>""")\ |
599 """ Skipping it.</p><p>Reason: {1}</p>""")\ |