summaryrefslogtreecommitdiffstats
path: root/peekaboo
diff options
context:
space:
mode:
authorMichael Weiser <michael.weiser@gmx.de>2019-04-01 12:21:25 +0000
committerMichael Weiser <michael.weiser@gmx.de>2019-04-01 12:23:47 +0000
commitd9ebf55b0cfa7849dcc360ae9d3d63bd418093ba (patch)
treee7659461e238b685cd25e965f0239a4889e2eef9 /peekaboo
parent99d5e478fe6d91ef683fd61df7494453154790d1 (diff)
Fix sample file path accessor usage in peekabooyar
peekabooyar seems to be the only user left of the file_path accessor of sample. Fix it for now.
Diffstat (limited to 'peekaboo')
-rw-r--r--peekaboo/toolbox/peekabooyar.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/peekaboo/toolbox/peekabooyar.py b/peekaboo/toolbox/peekabooyar.py
index 1b83665..4d3d4a3 100644
--- a/peekaboo/toolbox/peekabooyar.py
+++ b/peekaboo/toolbox/peekabooyar.py
@@ -48,8 +48,9 @@ class ContainsPeekabooYarRule(Rule):
}'''
)
- with open(s.get_file_path(), 'rb') as f:
- matches = rules.match(data=f.read())
+ # FIXME: Only user of file_path. Remove?
+ with open(s.file_path, 'rb') as sample_file:
+ matches = rules.match(data=sample_file.read())
if matches != []:
return self.result(Result.bad,