Skip to content
Browse files

Broken symlink handling fix #37

Fix from @Tyderion
  • Loading branch information...
1 parent 428332c commit dd699a464f54ed8ca71c769128505e8cfb3657b7 @robcowie committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 todo.py
View
5 todo.py
@@ -180,10 +180,11 @@ def extract(self):
yield {'filepath': filepath, 'linenum': linenum + 1, 'match': match}
except IOError:
## Probably a broken symlink
- pass
+ f = None
finally:
self.file_counter.increment()
- f.close()
+ if f is not None:
+ f.close()
class TodoRenderer(object):

0 comments on commit dd699a4

Please sign in to comment.
Something went wrong with that request. Please try again.