Skip to content

v2.0.x Chore - Consider improvements to multicast/env.py #264

Closed
@reactive-firewall

Description

@reactive-firewall

⚠️ Potential issue

Potential issue with bind_addr defaulting to an IPv4Address object

Since group is returned as an IPv4Address object (if not addressed), using it as a default value for bind_addr may lead to type mismatches. Ensure that bind_addr is consistently a string.

Apply this diff if load_group continues to return an IPv4Address:

-bind_addr =  os.getenv("MULTICAST_BIND_ADDR", group)  # skipcq: PYL-W1508
+bind_addr = os.getenv("MULTICAST_BIND_ADDR", str(group))

Originally posted by @coderabbitai[bot] in #259 (comment)

Metadata

Metadata

Labels

ChoreMiscellaneous chores to maintain the projectMulticastAny main project file changesPython LangChanges to Python source codebugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions