845 fn = os.path.join(ppath, file) |
845 fn = os.path.join(ppath, file) |
846 # read the file and split it into textlines |
846 # read the file and split it into textlines |
847 try: |
847 try: |
848 text, encoding = Utilities.readEncodedFile(fn) |
848 text, encoding = Utilities.readEncodedFile(fn) |
849 lines = text.splitlines() |
849 lines = text.splitlines() |
850 except (UnicodeError, OSError): |
850 except (OSError, UnicodeError): |
851 count += 1 |
851 count += 1 |
852 progress.setValue(count) |
852 progress.setValue(count) |
853 continue |
853 continue |
854 |
854 |
855 # now search tasks and record them |
855 # now search tasks and record them |
976 |
976 |
977 # read the file and split it into textlines |
977 # read the file and split it into textlines |
978 try: |
978 try: |
979 text, encoding = Utilities.readEncodedFile(fn) |
979 text, encoding = Utilities.readEncodedFile(fn) |
980 lines = text.splitlines() |
980 lines = text.splitlines() |
981 except (UnicodeError, OSError): |
981 except (OSError, UnicodeError): |
982 continue |
982 continue |
983 |
983 |
984 # now search tasks and record them |
984 # now search tasks and record them |
985 for lineIndex, line in enumerate(lines, start=1): |
985 for lineIndex, line in enumerate(lines, start=1): |
986 if self.__interrupt: |
986 if self.__interrupt: |