summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server
diff options
context:
space:
mode:
authorSol Jerome <sol.jerome@gmail.com>2015-07-22 15:36:23 -0500
committerSol Jerome <sol.jerome@gmail.com>2015-07-22 15:36:23 -0500
commit49ab865657f03795139e95490b1978fcceca2f41 (patch)
treec41beeca523fca354a586ad63c283a9c2133b709 /src/lib/Bcfg2/Server
parentc7e67299381df961ff8274e9b53827c2bddbb47b (diff)
parentb54c32c861b517b889b1cd6c0bbe082b8d93e5d2 (diff)
downloadbcfg2-49ab865657f03795139e95490b1978fcceca2f41.tar.gz
bcfg2-49ab865657f03795139e95490b1978fcceca2f41.tar.bz2
bcfg2-49ab865657f03795139e95490b1978fcceca2f41.zip
Merge branch 'merge-files-ignore-binary' of https://github.com/AlexanderS/bcfg2
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r--src/lib/Bcfg2/Server/Lint/MergeFiles.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Server/Lint/MergeFiles.py b/src/lib/Bcfg2/Server/Lint/MergeFiles.py
index 8e6a926ae..3a6251594 100644
--- a/src/lib/Bcfg2/Server/Lint/MergeFiles.py
+++ b/src/lib/Bcfg2/Server/Lint/MergeFiles.py
@@ -6,6 +6,7 @@ import copy
from difflib import SequenceMatcher
import Bcfg2.Server.Lint
from Bcfg2.Server.Plugins.Cfg import CfgGenerator
+from Bcfg2.Utils import is_string
def threshold(val):
@@ -50,6 +51,8 @@ class MergeFiles(Bcfg2.Server.Lint.ServerPlugin):
for filename, entryset in self.core.plugins['Cfg'].entries.items():
candidates = dict([(f, e) for f, e in entryset.entries.items()
if (isinstance(e, CfgGenerator) and
+ is_string(e.data,
+ Bcfg2.Options.setup.encoding) and
f not in ignore and
not f.endswith(".crypt"))])
similar, identical = self.get_similar(candidates)