Update wv_harness.py

This commit is contained in:
Tobias Falk 2024-07-20 23:40:09 +02:00
parent 4546413a01
commit 57386a997c

View File

@ -6,7 +6,7 @@ from collections import defaultdict
from dataclasses import dataclass, field, asdict from dataclasses import dataclass, field, asdict
from pathlib import Path from pathlib import Path
from typing import List, Union from typing import List, Union
from distutils.spawn import find_executable # from distutils.spawn import find_executable
from graphviz import Graph from graphviz import Graph
@ -417,7 +417,7 @@ class Harness:
def graphRender(self, type, filename, graph): def graphRender(self, type, filename, graph):
# Chack if the needed commands are existing # Chack if the needed commands are existing
if find_executable("dot") and find_executable("gvpr") and find_executable("neato"): if shutil.which("dot") and shutil.which("gvpr") and shutil.which("neato"):
# Set enviorments variable to path of this file # Set enviorments variable to path of this file
os.environ['GVPRPATH'] = str(Path(__file__).parent) os.environ['GVPRPATH'] = str(Path(__file__).parent)
# Export the gv output to a temporay file # Export the gv output to a temporay file