Skip to content

Commit 4e1b4d5

Browse files
authored
Update dcnm_links.py (#507)
1 parent 479d4ff commit 4e1b4d5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

plugins/modules/dcnm_links.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,9 +2149,10 @@ def dcnm_links_update_intra_fabric_links_information(
21492149
)
21502150
):
21512151
if cfg["profile"].get("enable_macsec", None) is None:
2152-
wlink["nvPairs"]["ENABLE_MACSEC"] = hlink["nvPairs"][
2153-
"ENABLE_MACSEC"
2154-
]
2152+
if wlink["nvPairs"].get("ENABLE_MACSEC"):
2153+
wlink["nvPairs"]["ENABLE_MACSEC"] = hlink["nvPairs"].get(
2154+
"ENABLE_MACSEC"
2155+
)
21552156

21562157
if (
21572158
wlink["templateName"]

0 commit comments

Comments
 (0)