202 @param total dictionary receiving the overall code statistics |
202 @param total dictionary receiving the overall code statistics |
203 @return a statistics object with the collected code statistics (SourceStat) |
203 @return a statistics object with the collected code statistics (SourceStat) |
204 """ |
204 """ |
205 try: |
205 try: |
206 text = Utilities.readEncodedFile(filename)[0] |
206 text = Utilities.readEncodedFile(filename)[0] |
207 except (UnicodeError, IOError): |
207 except (UnicodeError, OSError): |
208 return SourceStat() |
208 return SourceStat() |
209 |
209 |
210 parser = Parser() |
210 parser = Parser() |
211 parser.parse(text) |
211 parser.parse(text) |
212 |
212 |