@tohojo requested changes on this pull request.
> @@ -1682,7 +1683,13 @@ def check(self):
if self.ip_version is not None:
args.append("-{}".format(self.ip_version))
- args.append(self.host)
+ try:
+ ipaddress.IPv6Address(self.host)
+ host = "[{}]".format(self.host)
+ except ValueError:
+ host = self.host
Using the ipaddress module for parsing is fine, but let's move this into the
normalise_host() utility function. Simply adding a second argument 'bracket_v6'
which defaults to 'False' to that should do the trick :)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/tohojo/flent/pull/239#pullrequestreview-767221497
_______________________________________________
Flent-users mailing list -- flent-users@flent.org
To unsubscribe send an email to flent-users-le...@flent.org