From f3dd7684464f9bf17ffd28cec952f49c4debb1cc Mon Sep 17 00:00:00 2001 From: Jakob Scheid Date: Sat, 4 Apr 2026 16:28:27 +0200 Subject: [PATCH] Bug fix: jeb_utils.utils.is_valid_host returned None instead of False if the host is not valid --- README.md | 3 +++ pyproject.toml | 2 +- src/jeb_utils/utils.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0a72370..6d817f7 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,9 @@ pip install jeb-utils --index-url https://repo.jcloud-services.ddns.net/simple/ - `create_file_if_not_exists`: Creates a file if it does not exist. ## Changelog +### Version 0.3.2 +- Bug fix: `jeb_utils.utils.is_valid_host` returned `None` instead of `False` if the host is not valid + ### Version 0.3.1 - Fatal bug fix: `typing.Union` in `jeb_utils.utils` was used but not imported diff --git a/pyproject.toml b/pyproject.toml index 1b7d9e4..059a30e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "jeb-utils" -version = "0.3.1" +version = "0.3.2" description = "Common utils for JEB client and server." dependencies = ["cryptography"] license = "Apache-2.0" \ No newline at end of file diff --git a/src/jeb_utils/utils.py b/src/jeb_utils/utils.py index 5b6d0e7..b8c7970 100644 --- a/src/jeb_utils/utils.py +++ b/src/jeb_utils/utils.py @@ -176,7 +176,7 @@ def is_valid_host(host: str) -> bool: ipaddress.ip_address(host) return True except ValueError: - pass + return False def is_valid_port(port: str) -> bool: '''