Skip to content

Commit

Permalink
removeprefix
Browse files Browse the repository at this point in the history
  • Loading branch information
joente committed Sep 29, 2023
1 parent cf7f3a7 commit a88f473
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/check/idrac.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ def do_rename(state: dict):
new_state = {}
if 'systemStateTableEntry' in state:
new_state['systemState'] = [
{k.lstrip('systemState'): v for k, v in item.items()}
{k.removeprefix('systemState'): v for k, v in item.items()}
for item in state['systemStateTableEntry']]
else:
raise CheckException('missing systemStateTableEntry in SNMP result')

if 'eventLogTableEntry' in state:
new_state['eventLog'] = [
{k.lstrip('eventLog'): v for k, v in item.items()}
{k.removeprefix('eventLog'): v for k, v in item.items()}
for item in state['eventLogTableEntry']]

if 'firmwareTableEntry' in state:
new_state['firmware'] = [
{k.lstrip('firmware'): v for k, v in item.items()}
{k.removeprefix('firmware'): v for k, v in item.items()}
for item in state['firmwareTableEntry']]
return new_state

Expand Down
2 changes: 1 addition & 1 deletion lib/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Version string. Examples:
# '3.0.0'
# '3.0.0-alpha9'
__version__ = '3.0.0-alpha5'
__version__ = '3.0.0-alpha6'

0 comments on commit a88f473

Please sign in to comment.