Remove newlines from file contents

This commit is contained in:
Thierry Deo
2018-02-26 13:29:40 +01:00
parent 69333fa227
commit 2d57068f49

View File

@@ -29,7 +29,7 @@ def _process_filename_by_line(pattern, filename):
def _process_filename_at_once(pattern, filename):
retv = 0
with open(filename, 'rb') as f:
match = pattern.search(f.read())
match = pattern.search(f.read().decode('utf-8').replace('\n',''))
if match:
retv = 1
output.write('{}:'.format(filename))