Skip to content

Commit

Permalink
Apply black.
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsinenar committed Nov 29, 2023
1 parent ae616fc commit 54de9a5
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions agent/whois_ip_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ class WhoisIPAgent(agent.Agent, persist_mixin.AgentPersistMixin):
"""WhoisIP agent that collect IP registry and AS information using the RDAP protocol."""

def __init__(
self,
agent_definition: agent_definitions.AgentDefinition,
agent_settings: runtime_definitions.AgentSettings,
self,
agent_definition: agent_definitions.AgentDefinition,
agent_settings: runtime_definitions.AgentSettings,
) -> None:
agent.Agent.__init__(self, agent_definition, agent_settings)
persist_mixin.AgentPersistMixin.__init__(self, agent_settings)
Expand Down Expand Up @@ -99,7 +99,10 @@ def _process_dns_record(self, message: m.Message) -> None:
ip, record
)
self._emit_whois_message(whois_message)
except (ipwhois.exceptions.IPDefinedError, ipwhois.exceptions.HTTPLookupError):
except (
ipwhois.exceptions.IPDefinedError,
ipwhois.exceptions.HTTPLookupError,
):
# Case where of the loopback address.
logger.warning(
"some data not found when agent_whois_ip_asset try to process IP "
Expand Down Expand Up @@ -127,9 +130,9 @@ def _process_ip(self, message: m.Message) -> None:
)
self._emit_whois_message(whois_message)
except (
ipwhois.exceptions.IPDefinedError,
ipwhois.exceptions.ASNRegistryError,
ipwhois.exceptions.HTTPLookupError,
ipwhois.exceptions.IPDefinedError,
ipwhois.exceptions.ASNRegistryError,
ipwhois.exceptions.HTTPLookupError,
):
# Case where of the loopback address.
logger.warning(
Expand Down

0 comments on commit 54de9a5

Please sign in to comment.