diff options
author | Anteru <bitbucket@ca.sh13.net> | 2019-03-06 18:57:45 +0000 |
---|---|---|
committer | Anteru <bitbucket@ca.sh13.net> | 2019-03-06 18:57:45 +0000 |
commit | bce3a972a54517884bcbd45e09e0d3e911fe53d7 (patch) | |
tree | 2ede7d7e59662a0c783bfb02046fd8f3e51f9662 /scripts/check_sources.py | |
parent | 9cf54bd260fe4ec5acafc29965107c13ad0e7133 (diff) | |
parent | 17d2686040bc9eb9255f103e8573e85225bae920 (diff) | |
download | pygments-git-bce3a972a54517884bcbd45e09e0d3e911fe53d7.tar.gz |
Merged in jkmartindale/pygments-main (pull request #775)
Fix external links in RdLexer and NewLispLexer
Approved-by: James Martindale <atlassian@jkmartindale.com>
Diffstat (limited to 'scripts/check_sources.py')
-rwxr-xr-x | scripts/check_sources.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/check_sources.py b/scripts/check_sources.py index db09de42..c0524b6c 100755 --- a/scripts/check_sources.py +++ b/scripts/check_sources.py @@ -185,7 +185,8 @@ def main(argv): print("Checking %s..." % fn) try: - lines = open(fn, 'rb').read().decode('utf-8').splitlines() + with open(fn, 'rb') as f: + lines = f.read().decode('utf-8').splitlines() except (IOError, OSError) as err: print("%s: cannot open: %s" % (fn, err)) num += 1 |