Skip to content

Commit

Permalink
Use constant for default value
Browse files Browse the repository at this point in the history
and follow the example of the --port option for --host

Signed-off-by: Jörn Bethune <jörn@nospam.example.org>
  • Loading branch information
Jörn Bethune committed Dec 14, 2024
1 parent cf4f9d0 commit 19434ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/dearmep/cli/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@


DEFAULT_PORT = 8000
DEFAULT_HOST = "127.0.0.1"
LOG_LEVELS = ("critical", "error", "warning", "info", "debug")
DEFAULT_LOG_LEVEL = "info"

Expand Down Expand Up @@ -60,9 +61,8 @@ def add_parser(

parser.add_argument(
"--host",
type=str,
default="localhost",
help="local address on which the service listens",
default=DEFAULT_HOST,
help=f"TCP host address to bind to (default: {DEFAULT_HOST})",
)

parser.add_argument(
Expand Down

0 comments on commit 19434ee

Please sign in to comment.