From 2498f142782e26681c542dfca4b3f9fc4ff64808 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 29 Oct 2020 19:45:05 +0100 Subject: Clean up leftover file path references This change removes and direct references to the filesystem from the pyfbin code other that file_storage.filesystem. This should hopyfully be the last changes needed for pyfbin to be successfully run using the file_storage.s3 module without any issues. --- fbin-scanner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fbin-scanner.py') diff --git a/fbin-scanner.py b/fbin-scanner.py index 76bc33b..05f8739 100644 --- a/fbin-scanner.py +++ b/fbin-scanner.py @@ -83,10 +83,10 @@ def main(): files = deque(db.session.query(File).filter(File.scanned == False).all()) while len(files): dbfile = files.pop() - if not dbfile.get_size(): + if not dbfile.size: logger.info('Ignoring file %s/%s due to unknown size', dbfile.filename, dbfile.hash) continue - if dbfile.get_size() > 32*10**6: + if dbfile.size > 32*10**6: logger.info('Ignoring file %s/%s due to size (%s)', dbfile.filename, dbfile.hash, dbfile.formatted_size) continue logger.info('Checking file %s/%s (%s)', dbfile.filename, dbfile.hash, dbfile.formatted_size) -- cgit v1.2.3