Skip to content

Commit bb77326

Browse files
committed
[tools/rdfconverter] Use install path
1 parent d462155 commit bb77326

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

odml/tools/rdf_converter.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010

1111
from ..doc import BaseDocument
1212
from ..format import Format, Document, Section, Property
13-
from ..info import FORMAT_VERSION
14-
from ..resources import RDF_SUBCLASS_FILE
13+
from ..info import FORMAT_VERSION, INSTALL_PATH
1514
from .dict_parser import DictReader
1615
from .parser_utils import ParserException
1716
from .utils import RDFConversionFormats
@@ -34,11 +33,13 @@ def load_rdf_subclasses():
3433
"""
3534
section_subclasses = {}
3635

37-
if not os.path.isfile(RDF_SUBCLASS_FILE):
38-
print("[Warning] Could not find subclass file '%s'" % RDF_SUBCLASS_FILE)
36+
subclass_file = os.path.join(INSTALL_PATH, "resources", "section_subclasses.yaml")
37+
38+
if not os.path.isfile(subclass_file):
39+
print("[Warning] Could not find subclass file '%s'" % subclass_file)
3940
return section_subclasses
4041

41-
with open(RDF_SUBCLASS_FILE, "r") as yaml_file:
42+
with open(subclass_file, "r") as yaml_file:
4243
try:
4344
section_subclasses = yaml.load(yaml_file)
4445
except yaml.parser.ParserError as err:

0 commit comments

Comments
 (0)