From 5280090a7b5d4057b31c28077892e824e0dc83cd Mon Sep 17 00:00:00 2001 From: xunoaib <13055788+xunoaib@users.noreply.github.com> Date: Sat, 7 Feb 2026 05:07:32 -0500 Subject: [PATCH 1/2] Convert environment variable ports to integers --- brotab/env.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/brotab/env.py b/brotab/env.py index a9ac7b6..634aeaf 100644 --- a/brotab/env.py +++ b/brotab/env.py @@ -17,11 +17,11 @@ def http_iface(): def min_http_port(): - return environ.get('MIN_HTTP_PORT', DEFAULT_MIN_HTTP_PORT) + return int(environ.get('MIN_HTTP_PORT', DEFAULT_MIN_HTTP_PORT)) def max_http_port(): - return environ.get('MAX_HTTP_PORT', DEFAULT_MAX_HTTP_PORT) + return int(environ.get('MAX_HTTP_PORT', DEFAULT_MAX_HTTP_PORT)) def load_dotenv(filename=None): From d8aa65a1d60954d6da3871c7eab3270c8b1a2259 Mon Sep 17 00:00:00 2001 From: xunoaib <13055788+xunoaib@users.noreply.github.com> Date: Sat, 7 Feb 2026 05:10:29 -0500 Subject: [PATCH 2/2] Make MAX_HTTP_PORT inclusive --- brotab/inout.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brotab/inout.py b/brotab/inout.py index 92d923d..49e1568 100644 --- a/brotab/inout.py +++ b/brotab/inout.py @@ -18,7 +18,7 @@ def get_mediator_ports() -> Iterable: - return range(min_http_port(), max_http_port()) + return range(min_http_port(), max_http_port() + 1) def get_available_tcp_port(start=1025, end=65536, host='127.0.0.1'):