From 57887f924cc7e126e95da359a3a5d75257f41779 Mon Sep 17 00:00:00 2001 From: Max Altgelt Date: Thu, 6 Jun 2024 13:16:51 +0100 Subject: [PATCH] chore: linting issues in python collector --- scripts/thunderstorm-collector.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/thunderstorm-collector.py b/scripts/thunderstorm-collector.py index 7fad8af..937c15b 100755 --- a/scripts/thunderstorm-collector.py +++ b/scripts/thunderstorm-collector.py @@ -5,9 +5,7 @@ import os import re import ssl -import sys import time -import urllib.parse import uuid # Configuration @@ -34,6 +32,11 @@ num_submitted = 0 num_processed = 0 +# URL to use for submission +api_endpoint = "" + +# Original args +args = {} # Functions def process_dir(workdir): @@ -155,6 +158,7 @@ def submit_sample(filepath): time.sleep(2 << retries) continue + # pylint: disable=no-else-continue if resp.status == 503: # Service unavailable retry_time = resp.headers.get("Retry-After", 30) time.sleep(retry_time) @@ -230,8 +234,8 @@ def submit_sample(filepath): print("Starting the walk at: {} ...".format(", ".join(args.dirs))) # Walk directory - for dir in args.dirs: - process_dir(dir) + for walkdir in args.dirs: + process_dir(walkdir) # End message end_date = time.time()