summaryrefslogtreecommitdiff
path: root/sphinx/builders/linkcheck.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/builders/linkcheck.py')
-rw-r--r--sphinx/builders/linkcheck.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/builders/linkcheck.py b/sphinx/builders/linkcheck.py
index c3fd1e88a..2189411ee 100644
--- a/sphinx/builders/linkcheck.py
+++ b/sphinx/builders/linkcheck.py
@@ -9,7 +9,6 @@
:license: BSD, see LICENSE for details.
"""
-import codecs
import re
import socket
import threading
@@ -308,7 +307,8 @@ class CheckExternalLinksBuilder(Builder):
def write_entry(self, what, docname, line, uri):
# type: (unicode, unicode, int, unicode) -> None
- with codecs.open(path.join(self.outdir, 'output.txt'), 'a', 'utf-8') as output: # type: ignore # NOQA
+ with open(path.join(self.outdir, 'output.txt'), 'a', # type: ignore
+ encoding='utf-8') as output:
output.write("%s:%s: [%s] %s\n" % (self.env.doc2path(docname, None),
line, what, uri))