mirror of
https://github.com/nicolargo/glances.git
synced 2024-09-20 00:58:03 +03:00
Python 3 bug issue with alert
This commit is contained in:
parent
9371ec5205
commit
dc55711540
@ -125,8 +125,7 @@ class Plugin(GlancesPlugin):
|
||||
"""
|
||||
Compare a with b using the tolerance (if numerical)
|
||||
"""
|
||||
numericalType = [types.IntType, types.FloatType, types.LongType]
|
||||
if type(a) in numericalType and type(b) in numericalType:
|
||||
if str(int(a)).isdigit() and str(int(b)).isdigit():
|
||||
return abs(a-b) <= max(abs(a), abs(b)) * tolerance
|
||||
else:
|
||||
return a == b
|
||||
|
Loading…
Reference in New Issue
Block a user