Skip to content

Commit

Permalink
fix bucket tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed May 11, 2024
1 parent c52e538 commit f430954
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions bbot/core/helpers/web/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from socksio.exceptions import SOCKSError
from contextlib import asynccontextmanager

from .client import BBOTAsyncClient
from bbot.core.engine import EngineServer
from bbot.core.helpers.misc import bytes_to_human, human_to_bytes, get_exception_chain

Expand All @@ -34,7 +33,12 @@ def __init__(self, socket_path, target, config={}):
self.config = config
self.http_debug = self.config.get("http_debug", False)
self._ssl_context_noverify = None
self.web_client = BBOTAsyncClient.from_config(self.config, self.target, persist_cookies=False)
self.web_client = self.AsyncClient(persist_cookies=False)

def AsyncClient(self, *args, **kwargs):
from .client import BBOTAsyncClient

return BBOTAsyncClient.from_config(self.config, self.target, *args, **kwargs)

async def request(self, *args, **kwargs):
raise_error = kwargs.pop("raise_error", False)
Expand Down
2 changes: 1 addition & 1 deletion bbot/modules/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ async def _event_postcheck(self, event):
# check duplicates
is_incoming_duplicate, reason = self.is_incoming_duplicate(event, add=True)
if is_incoming_duplicate and not self.accept_dupes:
return False, f"module has already seen {event}" + (f" ({reason})" if reason else "")
return False, f"module has already seen it" + (f" ({reason})" if reason else "")

return acceptable, reason

Expand Down

0 comments on commit f430954

Please sign in to comment.