From b04116a95b7ce46177c94078a6fb45f88cf0b3a8 Mon Sep 17 00:00:00 2001 From: F10898 Date: Fri, 15 Jul 2022 14:43:44 +0200 Subject: [PATCH] fixed dictionary rewrite in mod_snmp_im_settings for python > 3.7 --- hpilo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hpilo.py b/hpilo.py index 78c5b31..14a2892 100644 --- a/hpilo.py +++ b/hpilo.py @@ -1691,9 +1691,10 @@ def mod_snmp_im_settings(self, snmp_access=None, web_agent_ip_address=None, for key in vars: if 'trapcommunity' in key and vars[key]: val = vars[key] + val_inter = {} for key_ in val.keys(): - val[key_.upper()] = str(val.pop(key_)) - elements.append(etree.Element(key.upper(), **val)) + val_inter[key_.upper()] = str(val[key_]) + elements.append(etree.Element(key.upper(), **val_inter)) elif 'snmp_user_profile' in key and vars[key]: elt = etree.Element(key[:-2].upper(), {'INDEX': key[-1]}) for key, val in vars[key].items():