From 1c9aee460881207e323f72a5c0d17db88e1ecc8d Mon Sep 17 00:00:00 2001 From: checktheroads Date: Mon, 13 Apr 2020 02:26:12 -0700 Subject: [PATCH] bump version to beta-21 --- hyperglass/constants.py | 2 +- hyperglass/main.py | 2 +- hyperglass/util.py | 12 +++++++++++- install.sh | 2 +- pyproject.toml | 2 +- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/hyperglass/constants.py b/hyperglass/constants.py index 9fdd9ad..1fb3648 100644 --- a/hyperglass/constants.py +++ b/hyperglass/constants.py @@ -4,7 +4,7 @@ import sys from datetime import datetime __name__ = "hyperglass" -__version__ = "1.0.0-beta.20" +__version__ = "1.0.0-beta.21" __author__ = "Matt Love" __copyright__ = f"Copyright {datetime.now().year} Matthew Love" __license__ = "BSD 3-Clause Clear License" diff --git a/hyperglass/main.py b/hyperglass/main.py index 9a62464..c74ea36 100644 --- a/hyperglass/main.py +++ b/hyperglass/main.py @@ -94,7 +94,7 @@ def on_starting(server: Arbiter): log.success( "Started hyperglass {v} on http://{h}:{p} with {w} workers", v=__version__, - h=str(params.listen_address), + h=format_listen_address(params.listen_address), p=str(params.listen_port), w=server.app.cfg.settings["workers"].value, ) diff --git a/hyperglass/util.py b/hyperglass/util.py index 9914078..8e72c0a 100644 --- a/hyperglass/util.py +++ b/hyperglass/util.py @@ -631,15 +631,25 @@ def format_listen_address(listen_address): """ from ipaddress import ip_address, IPv4Address, IPv6Address - if not isinstance(listen_address, (IPv4Address, IPv6Address)): + if isinstance(listen_address, str): try: listen_address = ip_address(listen_address) if listen_address.version == 6: listen_address = f"[{str(listen_address)}]" + else: + listen_address = str(listen_address) except ValueError: pass + + elif isinstance(listen_address, (IPv4Address, IPv6Address)): + if listen_address.version == 6: + listen_address = f"[{str(listen_address)}]" + else: + listen_address = str(listen_address) + else: listen_address = str(listen_address) + return listen_address diff --git a/install.sh b/install.sh index 8758833..a342fd2 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ set -e -HYPERGLASS_VERSION="1.0.0b20" +HYPERGLASS_VERSION="1.0.0b21" MIN_PYTHON_MAJOR="3" MIN_PYTHON_MINOR="6" diff --git a/pyproject.toml b/pyproject.toml index 3b28611..bc7a216 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.masonry.api" [tool.poetry] name = "hyperglass" -version = "1.0.0-beta.20" +version = "1.0.0-beta.21" description = "hyperglass is the modern network looking glass that tries to make the internet better." authors = ["Matt Love "] readme = "README.md"