Skip to content

Commit 6376e33

Browse files
committed
Revert to readlines
1 parent 0a66ec1 commit 6376e33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jupyter_sphinx/ast.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,8 @@ def run(self):
102102
location=location,
103103
)
104104
try:
105-
content = [line.rstrip() for line in Path(filename).read_text()]
105+
with Path(filename).open() as f:
106+
content = [line.rstrip() for line in f.readlines()]
106107
except (IOError, OSError):
107108
raise IOError("File {} not found or reading it failed".format(filename))
108109
else:

0 commit comments

Comments
 (0)