Skip to content

Commit 611fea4

Browse files
committed
Handled exception in get_node_types() ast.literal_eval(nodetypestring.decode())
1 parent d64d750 commit 611fea4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/graph_coalescence/graph_coalescer.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ def get_node_types( unique_link_nodes ):
242242
p.get(newcurie)
243243
all_typestrings = p.execute()
244244
for newcurie, nodetypestring in zip(ncg, all_typestrings):
245-
node_types = ast.literal_eval(nodetypestring.decode())
246-
nodetypedict[newcurie] = node_types
245+
if nodetypestring:
246+
node_types = ast.literal_eval(nodetypestring.decode())
247+
nodetypedict[newcurie] = node_types
247248
return nodetypedict
248249

249250

0 commit comments

Comments
 (0)