Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed dictionary rewrite in mod_snmp_im_settings for python > 3.7 #275

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions hpilo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down