Skip to content
Snippets Groups Projects
Commit ce307a02 authored by arnaudon's avatar arnaudon
Browse files

pathlib -> os.path

parent a5e36322
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ Copyright (c) 2018, EPFL/Blue Brain Project
import pandas
import re
import os
import lxml
import lxml.etree
......@@ -98,11 +99,9 @@ def read_mm_recipe(recipe_filename):
Returns:
A pandas.DataFrame with fields "layer", "fullmtype", and "etype".
"""
from pathlib import Path
if Path(recipe_filename).suffix == '.xml':
if os.path.splitext(recipe_filename)[1] == '.xml':
return read_mm_recipe_xml(recipe_filename)
elif Path(recipe_filename).suffix == '.yaml':
elif os.path.splitext(recipe_filename)[1] == '.yaml':
return read_mm_recipe_yaml(recipe_filename)
else:
raise Exception('Please provide an .xml or .yaml as recipe file')
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment