Tasks/TaskViewer.py

changeset 45
9a18f4dbb493
parent 13
1af94a91f439
child 53
c3eb7cc1ff8b
diff -r fe5cd20cb0eb -r 9a18f4dbb493 Tasks/TaskViewer.py
--- a/Tasks/TaskViewer.py	Sun Jan 10 13:59:15 2010 +0000
+++ b/Tasks/TaskViewer.py	Sun Jan 10 19:19:52 2010 +0000
@@ -771,11 +771,9 @@
             fn = os.path.join(self.project.ppath, file)
             # read the file and split it into textlines
             try:
-                f = open(fn, 'r')
-                text = f.read()
+                text, encoding = Utilities.readEncodedFile(fn)
                 lines = text.splitlines()
-                f.close()
-            except IOError:
+            except (UnicodeError, IOError):
                 count += 1
                 self.progress.setValue(count)
                 continue

eric ide

mercurial