From 13d92acdb3266923b36aab680768e6a8ba94afa6 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Thu, 25 May 2023 15:17:49 -0700 Subject: [PATCH] run-dev: Clarify magic number for errno.EADDRINUSE. Signed-off-by: Anders Kaseorg --- tools/run-dev | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/run-dev b/tools/run-dev index 56521753e9..219537a233 100755 --- a/tools/run-dev +++ b/tools/run-dev @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import argparse import asyncio +import errno import os import pwd import signal @@ -359,7 +360,7 @@ async def serve() -> None: try: app.listen(proxy_port, address=options.interface) except OSError as e: - if e.errno == 98: + if e.errno == errno.EADDRINUSE: print("\n\nERROR: You probably have another server running!!!\n\n") raise