From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-28.smtp.github.com (out-28.smtp.github.com [192.30.252.211]) by mail.toke.dk (Postfix) with ESMTPS id 84BF38C614D for ; Thu, 30 Sep 2021 08:40:12 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key) header.d=github.com header.i=@github.com header.b=ZLZF2jM3 Received: from github-lowworker-5825cd4.ac4-iad.github.net (github-lowworker-5825cd4.ac4-iad.github.net [10.52.22.68]) by smtp.github.com (Postfix) with ESMTP id B389C900EB3 for ; Wed, 29 Sep 2021 23:40:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2014; t=1632984011; bh=6U6Ho/t6+RbD9xhrt520CK2rmdmy0Wjvz+4dZAQZFNA=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:List-ID: List-Archive:List-Post:List-Unsubscribe:From; b=ZLZF2jM3+sZMGYoW10NnyF3gdNHz7v4xHz7Z3qS3ENdMG/gmpTlOV6pFInjReRtRl 61rVgy/fGDqq9xnF0THbuMomba8b4k7Pkmr9uzu3wsOKhRhaC5lN2VtyvXei3gw8+m Nq+neo8z0+utLycrrNHAJ09B1Ue+min7tEQp4Avk= Date: Wed, 29 Sep 2021 23:40:11 -0700 From: Pete Heist To: tohojo/flent Message-ID: In-Reply-To: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_61555bcba611a_3214c760816bb"; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: list X-GitHub-Sender: heistp X-GitHub-Recipient: flent-users X-GitHub-Reason: subscribed X-Auto-Response-Suppress: All X-GitHub-Recipient-Address: flent-users@flent.org Message-ID-Hash: OWNX4JHO3FZOZQ2UDNQT6TGML776CKIV X-Message-ID-Hash: OWNX4JHO3FZOZQ2UDNQT6TGML776CKIV X-MailFrom: noreply@github.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Subscribed X-Mailman-Version: 3.3.4 Reply-To: tohojo/flent Subject: [Flent-users] Re: [tohojo/flent] runners: Bracket IPv6 addresses before passing to irtt (#239) List-Id: Flent discussion list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: ----==_mimepart_61555bcba611a_3214c760816bb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit @heistp commented 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 Ah, I didn't notice that, that's a much better solution. :) -- 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#discussion_r719101580 ----==_mimepart_61555bcba611a_3214c760816bb Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

@heistp commented on this pull request.


In flent/runners.py:

> @@ -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

Ah, I didn't notice that, that's a much better solution. :)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

----==_mimepart_61555bcba611a_3214c760816bb--