Fix for Python 2.7 compatibility regression.

pull/835/head
Louis Vézina 5 years ago
parent 7d881e6de9
commit cc61d0188f

@ -117,7 +117,10 @@ def start_bazarr(process_registry=ProcessRegistry()):
script = [sys.executable, "-u", os.path.normcase(os.path.join(dir_name, 'bazarr', 'main.py'))] + sys.argv[1:]
print("Bazarr starting...")
ep = subprocess.Popen(script, stdout=None, stderr=None, stdin=subprocess.DEVNULL)
if PY3:
ep = subprocess.Popen(script, stdout=None, stderr=None, stdin=subprocess.DEVNULL)
else:
ep = subprocess.Popen(script, stdout=None, stderr=None, stdin=None)
process_registry.register(ep)
try:
ep.wait()

@ -9,7 +9,11 @@ import zipfile
import rarfile
from subzero.language import Language
from requests import Session
from urllib.parse import urlparse
from six import PY2
if PY2:
from urlparse import urlparse
else:
from urllib.parse import urlparse
from subliminal import __short_version__
from subliminal.exceptions import ServiceUnavailable

Loading…
Cancel
Save