Skip to content

Commit

Permalink
fixup! Ensure out directory is there
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed Aug 1, 2018
1 parent b205d98 commit 0b2f0e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visualize.py
Expand Up @@ -63,8 +63,8 @@ def _load_style(filename):

def write_dot(graph: nx.MultiDiGraph, target='base_graph.dot', style=_load_style('styles.yaml'), highlight=None, record='auto'):
logger.info('Writing %s ...', target)
if isinstance(target, Path):
target.parent.mkdir(exists_ok=True, parents=True)
target_path = Path(target)
target_path.parent.mkdir(exist_ok=True, parents=True)
if record == 'auto':
record = len(graph.edges) < 1000

Expand Down

0 comments on commit 0b2f0e2

Please sign in to comment.