diff options
author | Michael Weiser <michael.weiser@gmx.de> | 2019-04-01 12:21:25 +0000 |
---|---|---|
committer | Michael Weiser <michael.weiser@gmx.de> | 2019-04-01 12:23:47 +0000 |
commit | d9ebf55b0cfa7849dcc360ae9d3d63bd418093ba (patch) | |
tree | e7659461e238b685cd25e965f0239a4889e2eef9 /peekaboo | |
parent | 99d5e478fe6d91ef683fd61df7494453154790d1 (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.py | 5 |
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, |