mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 05:19:41 +00:00
Make use of pathlib nearly everywhere (breaks docs gen)
Python 3.6 introduced support for the os.PathLike interface, which means Python 3.5 did not have it yet and attempting to use it in os functions would fail. Instead we can use pathlib for everything, but not all work is done yet.
This commit is contained in:
@@ -57,7 +57,7 @@ def parse_errors(csv_file):
|
||||
Parses the input CSV file with columns (name, error codes, description)
|
||||
and yields `Error` instances as a result.
|
||||
"""
|
||||
with open(csv_file, newline='') as f:
|
||||
with csv_file.open(newline='') as f:
|
||||
f = csv.reader(f)
|
||||
next(f, None) # header
|
||||
for line, (name, codes, description) in enumerate(f, start=2):
|
||||
|
Reference in New Issue
Block a user