Skip to content

Commit

Permalink
Merge pull request #12 from CybercentreCanada/hotfix/retry_on_retryfail
Browse files Browse the repository at this point in the history
raise Recoverable on RetryError
  • Loading branch information
cccs-rs authored Jul 14, 2021
2 parents 7864065 + 3322813 commit 283d254
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 283d254

Please sign in to comment.