Use open built-in to open files

* This makes Python 3 not raise UnicodeDecodeError when reading files
This commit is contained in:
Sviatoslav Sydorenko 2016-12-29 18:53:57 +02:00
parent 9573c13884
commit 51f8cc8ff0
6 changed files with 9 additions and 14 deletions

View file

@ -57,7 +57,7 @@ def main(argv=None):
retv = 0
for filename in args.filenames:
contents = io.open(filename).read()
contents = open(filename).read()
retv |= check_docstring_first(contents, filename=filename)
return retv