Skip to content

Commit

Permalink
chore: linting issues in python collector
Browse files Browse the repository at this point in the history
  • Loading branch information
secDre4mer committed Jun 6, 2024
1 parent b066586 commit 57887f9
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/thunderstorm-collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
import os
import re
import ssl
import sys
import time
import urllib.parse
import uuid

# Configuration
Expand All @@ -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):
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 57887f9

Please sign in to comment.