Skip to content

Commit

Permalink
fix: keyerror when parsing user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
kshychko committed Jan 10, 2024
1 parent 5de4181 commit bd95688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alb-s3-sqs-es/alb_s3/ingester/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, log_msg):
self.message["client_port"] = client_ip[-1]

# Parse User-Agent string
if self.message["user_agent"] is not None:
if "user_agent" in self.message:
user_agent = parse(self.message["user_agent"])
user_agent_details = {}
user_agent_details["browser"] = user_agent.get_browser()
Expand Down

0 comments on commit bd95688

Please sign in to comment.