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:
Lonami Exo
2019-01-06 21:36:32 +01:00
parent e565552ae9
commit b57e3e3e0a
3 changed files with 3 additions and 3 deletions

View File

@@ -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: