Skip to content

Commit 2cf2d37

Browse files
committed
REF: Reduce double logging from exception to warning
1 parent 621c894 commit 2cf2d37

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nipype/utils/draw_gantt_chart.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import simplejson as json
1111

1212
from collections import OrderedDict
13+
from warnings import warn
1314

1415
# Pandas
1516
try:
@@ -66,9 +67,9 @@ def create_event_dict(start_time, nodes_list):
6667
finish_delta = (node["finish"] - start_time).total_seconds()
6768

6869
# Populate dictionary
69-
if events.get(start_delta) or events.get(finish_delta):
70+
if events.get(start_delta):
7071
err_msg = "Event logged twice or events started at exact same time!"
71-
raise KeyError(err_msg)
72+
warn(str(KeyError(err_msg)), category=Warning)
7273
events[start_delta] = start_node
7374
events[finish_delta] = finish_node
7475

0 commit comments

Comments
 (0)