diff --git a/ensure_sorted.py b/ensure_sorted.py index 700c3211..50b6683c 100755 --- a/ensure_sorted.py +++ b/ensure_sorted.py @@ -54,10 +54,10 @@ def __repr__(self): return self.__str__() def main(): - readme_file = open('README.md', 'r') # start of the Apps section APPS_LINE_START = '## – Apps –\n' - lines = readme_file.readlines() + with open('README.md', 'r') as readme_file: + lines = readme_file.readlines() index: int try: