Skip to content

Commit bd75150

Browse files
committed
Fix broken graphviz import
1 parent c0586d8 commit bd75150

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

binarytree/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,12 @@
2121
from typing import Any, Deque, Dict, Iterator, List, Optional, Tuple, Union
2222

2323
from graphviz import Digraph, nohtml
24-
from graphviz.exceptions import ExecutableNotFound
24+
25+
try:
26+
from graphviz.exceptions import ExecutableNotFound
27+
except ImportError:
28+
# noinspection PyProtectedMember
29+
from graphviz import ExecutableNotFound
2530
from pkg_resources import get_distribution
2631

2732
from binarytree.exceptions import (

0 commit comments

Comments
 (0)