Skip to content

Commit 70e3136

Browse files
committed
Fixes
1 parent 9bcbb38 commit 70e3136

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

defaultMapping.x3ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10537,7 +10537,7 @@
1053710537
</target_node>
1053810538
</range>
1053910539
</link>
10540-
<link>
10540+
<link skip='true'>
1054110541
<path>
1054210542
<source_relation>
1054310543
<relation>lido:eventType/lido:term</relation>

x3ml.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,11 @@ def from_str(cls, xml_str: str):
374374
@classmethod
375375
def from_file(cls, fileName: str):
376376
'''Returns all mappings from a file'''
377-
xml_str = Path(fileName).read_text(encoding='UTF-8')
378-
return cls().from_str(xml_str)
377+
p = Path(fileName)
378+
if p.is_file():
379+
xml_str = p.read_text(encoding='UTF-8')
380+
return cls().from_str(xml_str)
381+
return cls()
379382

380383

381384
def mapping_list(elem)-> list:

0 commit comments

Comments
 (0)