mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-23 00:03:33 +00:00
Fix for Python 2.7 compatibility regression.
This commit is contained in:
parent
7d881e6de9
commit
cc61d0188f
2 changed files with 9 additions and 2 deletions
|
@ -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...")
|
||||
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…
Reference in a new issue