add global WINDOWS bool

This commit is contained in:
Mike Fährmann
2020-05-19 21:42:11 +02:00
parent 6294e2c540
commit c8787647ed
6 changed files with 11 additions and 13 deletions

View File

@@ -10,9 +10,8 @@
from .common import Extractor, Message
from . import deviantart, flickr, reddit, smugmug, tumblr
from .. import text, oauth, config, exception
from .. import text, oauth, util, config, exception
from ..cache import cache
import os
import urllib.parse
REDIRECT_URI_LOCALHOST = "http://localhost:6414/"
@@ -42,7 +41,7 @@ class OAuthBase(Extractor):
server.listen(1)
# workaround for ctrl+c not working during server.accept on Windows
if os.name == "nt":
if util.WINDOWS:
server.settimeout(1.0)
while True:
try: