Skip to content

Commit

Permalink
raise Recoverable on RetryError
Browse files Browse the repository at this point in the history
  • Loading branch information
cccs-rs committed Jul 14, 2021
1 parent 7864065 commit 3322813
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions suricata_/suricata_.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from io import StringIO
from pathlib import Path
from retrying import retry
from retrying import retry, RetryError

from assemblyline.common.digests import get_sha256_for_file
from assemblyline.common.exceptions import RecoverableError
Expand Down Expand Up @@ -159,7 +159,10 @@ def reload_rules(self):

def start_suricata_if_necessary(self):
if not self.suricata_running():
self.launch_or_load_suricata()
try:
self.launch_or_load_suricata()
except RetryError as e:
raise RecoverableError(e)

# Try connecting to the Suricata socket
def suricata_running(self):
Expand Down

0 comments on commit 3322813

Please sign in to comment.