Skip to content

Commit

Permalink
Updating to allow context-manager invocations to work with new buildD…
Browse files Browse the repository at this point in the history
…ot refactoring
  • Loading branch information
hyakuhei committed May 16, 2021
1 parent a9b94cc commit c8c0691
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions attacktree/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ def render(
fout: str = "png",
renderOnExit=False,
):

self.renderOnExit = renderOnExit
if root is None and self.root is not None:
root = self.root # sometimes we invoke as a context manager

dot = self.buildDot(
root=root, includeUnimplemented=renderUnimplemented, style=style
)
Expand Down

0 comments on commit c8c0691

Please sign in to comment.