From a197107dbce791fb3fe33b73a812e2991d88b93d Mon Sep 17 00:00:00 2001 From: Christian Hopps Date: Wed, 17 Jan 2024 09:18:21 +0000 Subject: [PATCH] tests: fix munet accessing missing attribute Signed-off-by: Christian Hopps --- tests/topotests/munet/base.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/topotests/munet/base.py b/tests/topotests/munet/base.py index c007ba36cda8..72b5df54b965 100644 --- a/tests/topotests/munet/base.py +++ b/tests/topotests/munet/base.py @@ -21,7 +21,6 @@ import sys import tempfile import time as time_mod - from collections import defaultdict from pathlib import Path from typing import Union @@ -29,10 +28,8 @@ from . import config as munet_config from . import linux - try: import pexpect - from pexpect.fdpexpect import fdspawn from pexpect.popen_spawn import PopenSpawn @@ -1237,7 +1234,7 @@ def run_in_window( envvars = f"MUNET_NODENAME={self.name} NODENAME={self.name}" if hasattr(self, "rundir"): envvars += f" RUNDIR={self.rundir}" - if self.unet.config_dirname: + if hasattr(self.unet, "config_dirname") and self.unet.config_dirname: envvars += f" CONFIGDIR={self.unet.config_dirname}" elif "CONFIGDIR" in os.environ: envvars += f" CONFIGDIR={os.environ['CONFIGDIR']}"