Skip to content

Commit

Permalink
tests: fix munet accessing missing attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hopps <[email protected]>
  • Loading branch information
choppsv1 committed Jan 17, 2024
1 parent 18257b5 commit a197107
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/topotests/munet/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,15 @@
import sys
import tempfile
import time as time_mod

from collections import defaultdict
from pathlib import Path
from typing import Union

from . import config as munet_config
from . import linux


try:
import pexpect

from pexpect.fdpexpect import fdspawn
from pexpect.popen_spawn import PopenSpawn

Expand Down Expand Up @@ -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']}"
Expand Down

0 comments on commit a197107

Please sign in to comment.