[oauth] add host config option (#2806)

This commit is contained in:
Martin Juhasz
2022-08-14 17:08:01 +02:00
committed by GitHub
parent 9ad3cdc5d8
commit 9ea521bec5
3 changed files with 13 additions and 1 deletions

View File

@@ -41,7 +41,8 @@ class OAuthBase(Extractor):
stdout_write("Waiting for response. (Cancel with Ctrl+c)\n")
server = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
server.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
server.bind(("localhost", self.config("port", 6414)))
server.bind((self.config("host", "localhost"),
self.config("port", 6414)))
server.listen(1)
# workaround for ctrl+c not working during server.accept on Windows