mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2026-01-25 09:30:22 +01:00
Update doubleFilter.py
Correcting the following issues (https://github.com/Schrolli91/BOSWatch/issues/217) -Consider using enumerate instead of iterating with range and len
This commit is contained in:
parent
3ce29711a1
commit
67a1028081
|
|
@ -31,12 +31,10 @@ def checkID(typ, data, msg=""):
|
|||
@return: True if check was OK
|
||||
@return: False if double was found
|
||||
"""
|
||||
global doubleList
|
||||
timestamp = int(time.time()) # Get Timestamp
|
||||
|
||||
logging.debug("checkID: %s (%s)", data, msg)
|
||||
for i in range(len(doubleList)):
|
||||
(xID, xTimestamp, xMsg) = doubleList[i]
|
||||
for (xID, xTimestamp, xMsg) in doubleList:
|
||||
# given ID found?
|
||||
# return False if the first entry in double_ignore_time is found, we will not check for younger ones...
|
||||
if data == xID and timestamp < xTimestamp + globalVars.config.getint("BOSWatch", "doubleFilter_ignore_time"):
|
||||
|
|
|
|||
Loading…
Reference in a new issue