mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-11-24 03:54:25 +01:00
add encoding (#122)
if not set encoding attr,there maybe have some exceptions when open reading.
This commit is contained in:
parent
54883f5134
commit
31dcd9b062
@ -21,7 +21,7 @@ def fetch_updated_doc():
|
|||||||
|
|
||||||
|
|
||||||
def render_doc():
|
def render_doc():
|
||||||
with open(file_name, 'r') as f:
|
with open(file_name, 'r', encoding='utf-8') as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
pydoc.pager(content)
|
pydoc.pager(content)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user