209 @param total dictionary receiving the overall code statistics |
209 @param total dictionary receiving the overall code statistics |
210 @return a statistics object with the collected code statistics (SourceStat) |
210 @return a statistics object with the collected code statistics (SourceStat) |
211 """ |
211 """ |
212 try: |
212 try: |
213 text = Utilities.readEncodedFile(filename)[0] |
213 text = Utilities.readEncodedFile(filename)[0] |
214 except (UnicodeError, OSError): |
214 except (OSError, UnicodeError): |
215 return SourceStat() |
215 return SourceStat() |
216 |
216 |
217 parser = Parser() |
217 parser = Parser() |
218 parser.parse(text) |
218 parser.parse(text) |
219 |
219 |