summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2024-10-28 17:13:33 -0400
committermorpheus65535 <[email protected]>2024-10-28 17:13:33 -0400
commit4eb09c546d4ebb612340de80301fdfc7549843b1 (patch)
treece0e0d4663137225196eb1e5cd60246dac27f939
parentac1a3c5eb07650eb3942163ca3d8f6485a2027b5 (diff)
downloadbazarr-1.4.6-beta.15.tar.gz
bazarr-1.4.6-beta.15.zip
Fixed an issue that prevented Bazarr from starting when PIv6 has been disabled using grub. #2738v1.4.6-beta.15
-rw-r--r--bazarr/app/server.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bazarr/app/server.py b/bazarr/app/server.py
index 4ffe436ce..85c2eb680 100644
--- a/bazarr/app/server.py
+++ b/bazarr/app/server.py
@@ -49,12 +49,12 @@ class Server:
threads=100)
self.connected = True
except OSError as error:
- if error.errno == errno.EADDRNOTAVAIL:
+ if error.errno == 49:
logging.exception("BAZARR cannot bind to specified IP, trying with 0.0.0.0")
self.address = '0.0.0.0'
self.connected = False
super(Server, self).__init__()
- elif error.errno == errno.EADDRINUSE:
+ elif error.errno == 48:
if self.port != '6767':
logging.exception("BAZARR cannot bind to specified TCP port, trying with default (6767)")
self.port = '6767'
@@ -64,6 +64,11 @@ class Server:
logging.exception("BAZARR cannot bind to default TCP port (6767) because it's already in use, "
"exiting...")
self.shutdown(EXIT_PORT_ALREADY_IN_USE_ERROR)
+ elif error.errno == 97:
+ logging.exception("BAZARR cannot bind to IPv6 (*), trying with 0.0.0.0")
+ self.address = '0.0.0.0'
+ self.connected = False
+ super(Server, self).__init__()
else:
logging.exception("BAZARR cannot start because of unhandled exception.")
self.shutdown()