1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-23 08:13:14 +00:00

Fix for Python 2.7 compatibility regression.

This commit is contained in:
Louis Vézina 2020-02-16 10:37:55 -05:00
parent 7d881e6de9
commit cc61d0188f
2 changed files with 9 additions and 2 deletions

View file

@ -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:] script = [sys.executable, "-u", os.path.normcase(os.path.join(dir_name, 'bazarr', 'main.py'))] + sys.argv[1:]
print("Bazarr starting...") print("Bazarr starting...")
if PY3:
ep = subprocess.Popen(script, stdout=None, stderr=None, stdin=subprocess.DEVNULL) 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) process_registry.register(ep)
try: try:
ep.wait() ep.wait()

View file

@ -9,7 +9,11 @@ import zipfile
import rarfile import rarfile
from subzero.language import Language from subzero.language import Language
from requests import Session 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 import __short_version__
from subliminal.exceptions import ServiceUnavailable from subliminal.exceptions import ServiceUnavailable