mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Changed range(len()) to enumerate()
This commit is contained in:
parent
1e13586546
commit
404c1b50f7
2 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ def beacon(config):
|
|||
__context__[LOC_KEY] = fp_.tell()
|
||||
pack = struct.unpack(FMT, raw)
|
||||
event = {}
|
||||
for ind in range(len(FIELDS)):
|
||||
for ind in enumerate(FIELDS):
|
||||
event[FIELDS[ind]] = pack[ind]
|
||||
if isinstance(event[FIELDS[ind]], str):
|
||||
event[FIELDS[ind]] = event[FIELDS[ind]].strip('\x00')
|
||||
|
|
|
@ -70,7 +70,7 @@ def beacon(config):
|
|||
__context__[LOC_KEY] = fp_.tell()
|
||||
pack = struct.unpack(FMT, raw)
|
||||
event = {}
|
||||
for ind in range(len(FIELDS)):
|
||||
for ind in enumerate(FIELDS):
|
||||
event[FIELDS[ind]] = pack[ind]
|
||||
if isinstance(event[FIELDS[ind]], str):
|
||||
event[FIELDS[ind]] = event[FIELDS[ind]].strip('\x00')
|
||||
|
|
Loading…
Add table
Reference in a new issue