Bug fix: jeb_utils.utils.is_valid_host returned None instead of False if the host is not valid
This commit is contained in:
@@ -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.
|
- `create_file_if_not_exists`: Creates a file if it does not exist.
|
||||||
|
|
||||||
## Changelog
|
## 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
|
### Version 0.3.1
|
||||||
- Fatal bug fix: `typing.Union` in `jeb_utils.utils` was used but not imported
|
- Fatal bug fix: `typing.Union` in `jeb_utils.utils` was used but not imported
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "jeb-utils"
|
name = "jeb-utils"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
description = "Common utils for JEB client and server."
|
description = "Common utils for JEB client and server."
|
||||||
dependencies = ["cryptography"]
|
dependencies = ["cryptography"]
|
||||||
license = "Apache-2.0"
|
license = "Apache-2.0"
|
||||||
@@ -176,7 +176,7 @@ def is_valid_host(host: str) -> bool:
|
|||||||
ipaddress.ip_address(host)
|
ipaddress.ip_address(host)
|
||||||
return True
|
return True
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
return False
|
||||||
|
|
||||||
def is_valid_port(port: str) -> bool:
|
def is_valid_port(port: str) -> bool:
|
||||||
'''
|
'''
|
||||||
|
|||||||
Reference in New Issue
Block a user