mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-11-12 12:00:37 +00:00
Fix some open calls were not being made through pathlib
This was causing the documentation to fail to build under Python 3.5.
This commit is contained in:
@@ -137,7 +137,7 @@ def parse_tl(file_path, layer, methods=None, ignored_ids=CORE_TYPES):
|
||||
def find_layer(file_path):
|
||||
"""Finds the layer used on the specified scheme.tl file."""
|
||||
layer_regex = re.compile(r'^//\s*LAYER\s*(\d+)$')
|
||||
with open(file_path, 'r', encoding='utf-8') as file:
|
||||
with file_path.open('r') as file:
|
||||
for line in file:
|
||||
match = layer_regex.match(line)
|
||||
if match:
|
||||
|
||||
Reference in New Issue
Block a user