Flent-users discussion archives
 help / color / mirror / Atom feed
From: Pete Heist <notifications@github.com>
To: tohojo/flent <flent@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [Flent-users] Re: [tohojo/flent] runners: Bracket IPv6 addresses before passing to irtt (#239)
Date: Thu, 30 Sep 2021 00:15:47 -0700
Message-ID: <tohojo/flent/pull/239/review/767478285@github.com> (raw)
In-Reply-To: <tohojo/flent/pull/239@github.com>

[-- Attachment #1: Type: text/plain, Size: 955 bytes --]

@heistp commented on this pull request.

> @@ -1682,7 +1683,13 @@ def check(self):
             if self.ip_version is not None:
-            args.append(self.host)
+            try:
+                ipaddress.IPv6Address(self.host)
+                host = "[{}]".format(self.host)
+            except ValueError:
+                host = self.host

It just occurred to me that when adding optional parameters, it might be good practice to specify them by name in calls to those functions, so I updated that. I don't know what normal python practice is. I guess as long as the parameter positions don't change it's not critical, but this might also make it more apparent what you're doing in the call itself.

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:

[-- Attachment #2: Type: text/html, Size: 2404 bytes --]

  parent reply	other threads:[~2021-09-30  7:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 12:32 [Flent-users] " Pete Heist
2021-09-29 21:51 ` [Flent-users] " Toke Høiland-Jørgensen
2021-09-30  6:38 ` Pete Heist
2021-09-30  6:40 ` Pete Heist
2021-09-30  7:12 ` Pete Heist
2021-09-30  7:15 ` Pete Heist [this message]
2021-09-30 11:12 ` Toke Høiland-Jørgensen
2021-09-30 13:27 ` Pete Heist
2021-09-30 13:56 ` Toke Høiland-Jørgensen
2021-09-30 13:59 ` Toke Høiland-Jørgensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://lists.flent.org/postorius/lists/flent-users.flent.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tohojo/flent/pull/239/review/767478285@github.com \
    --to=notifications@github.com \
    --cc=flent@noreply.github.com \
    --cc=reply+AHVNJP7QGJPTUDM2IMLY6RN7MFCSHEVBNHHDYQIZXE@reply.github.com \
    --cc=subscribed@noreply.github.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Flent-users discussion archives

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lists.flent.org/flent-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 flent-users flent-users/ https://lists.flent.org/flent-users \
	public-inbox-index flent-users

Example config snippet for mirrors.

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git