Skip to content

Commit

Permalink
code: protect access to optional attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Hopps <chopps@labn.net>
  • Loading branch information
choppsv1 committed Jan 17, 2024
1 parent 53609de commit 0027a85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion munet/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,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 0027a85

Please sign in to comment.