summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/ftools.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/utils/ftools.py')
-rw-r--r--meta/lib/oeqa/utils/ftools.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/lib/oeqa/utils/ftools.py b/meta/lib/oeqa/utils/ftools.py
index 1bd9a30a40..a7233d4ca6 100644
--- a/meta/lib/oeqa/utils/ftools.py
+++ b/meta/lib/oeqa/utils/ftools.py
@@ -36,10 +36,11 @@ def remove_from_file(path, data):
36 return 36 return
37 else: 37 else:
38 raise 38 raise
39 lines = rdata.splitlines() 39
40 rmdata = data.strip().splitlines() 40 contents = rdata.strip().splitlines()
41 for l in rmdata: 41 for r in data.strip().splitlines():
42 for c in range(0, lines.count(l)): 42 try:
43 i = lines.index(l) 43 contents.remove(r)
44 del(lines[i]) 44 except ValueError:
45 write_file(path, "\n".join(lines)) 45 pass
46 write_file(path, "\n".join(contents))