diff --git a/graphviz_py/parser.py b/graphviz_py/parser.py index 4a9b119..1e037a5 100644 --- a/graphviz_py/parser.py +++ b/graphviz_py/parser.py @@ -50,7 +50,7 @@ def convert(python_graphviz: str, arguments: List[str]) -> str: output = str(output) else: - exec(py_code) + exec(py_code, globals()) output = "" except Exception as ex: raise Exception(f"Error while processing: {expression}", ex) diff --git a/pyproject.toml b/pyproject.toml index 0596c83..89d8e13 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "graphviz-py" -version = "1.0.6" +version = "1.0.7" description = "Allows Python code execution inside of graphviz diagrams." authors = ["Alwin Schuster "] license = 'MPL-2.0'