summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Laß <bevan@bi-co.net>2024-01-02 14:25:34 +0100
committercasept <davids.paskevics@gmail.com>2024-01-31 13:14:14 +0000
commitf4c9be64648848eb7ec94e165ddcbb2df7ef8e25 (patch)
tree5ec66fb0662660c814410b6740f4b81f36a63d42
parentf9e4408ba606d3c14e69592d6b95d7629be9557c (diff)
downloadbcfg2-f4c9be64648848eb7ec94e165ddcbb2df7ef8e25.tar.gz
bcfg2-f4c9be64648848eb7ec94e165ddcbb2df7ef8e25.tar.bz2
bcfg2-f4c9be64648848eb7ec94e165ddcbb2df7ef8e25.zip
bcfg2-lint: correctly parse threshold option
We need to convert from str to float before doing the comparison.
-rw-r--r--src/lib/Bcfg2/Server/Lint/MergeFiles.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/MergeFiles.py b/src/lib/Bcfg2/Server/Lint/MergeFiles.py
index 3a6251594..3b89e507a 100644
--- a/src/lib/Bcfg2/Server/Lint/MergeFiles.py
+++ b/src/lib/Bcfg2/Server/Lint/MergeFiles.py
@@ -121,9 +121,9 @@ class MergeFiles(Bcfg2.Server.Lint.ServerPlugin):
if seqmatch.real_quick_ratio() == 1.0:
identical.add(cname)
elif (
- seqmatch.real_quick_ratio() > Bcfg2.Options.setup.threshold and
- seqmatch.quick_ratio() > Bcfg2.Options.setup.threshold and
- seqmatch.ratio() > Bcfg2.Options.setup.threshold):
+ seqmatch.real_quick_ratio() > threshold(Bcfg2.Options.setup.threshold) and
+ seqmatch.quick_ratio() > threshold(Bcfg2.Options.setup.threshold) and
+ seqmatch.ratio() > threshold(Bcfg2.Options.setup.threshold)):
similar.add(cname)
if similar:
similar.add(fname)