mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-14 17:22:56 -07:00
Set PYTHON2 global variable
This commit is contained in:
parent
fb395fc2e9
commit
9e0153e962
35 changed files with 43 additions and 42 deletions
|
@ -59,7 +59,7 @@ import facebook
|
|||
import twitter
|
||||
|
||||
import plexpy
|
||||
if plexpy.PYTHON_VERSION < 3:
|
||||
if plexpy.PYTHON2:
|
||||
import common
|
||||
import database
|
||||
import helpers
|
||||
|
@ -2814,7 +2814,7 @@ class SCRIPTS(Notifier):
|
|||
if self.pythonpath:
|
||||
custom_env['PYTHONPATH'] = os.pathsep.join([p for p in sys.path if p])
|
||||
|
||||
if plexpy.PYTHON_VERSION < 3:
|
||||
if plexpy.PYTHON2:
|
||||
custom_env = {k.encode('utf-8'): v.encode('utf-8') for k, v in custom_env.items()}
|
||||
|
||||
env = os.environ.copy()
|
||||
|
@ -2914,7 +2914,7 @@ class SCRIPTS(Notifier):
|
|||
|
||||
script.extend(script_args)
|
||||
|
||||
if plexpy.PYTHON_VERSION < 3:
|
||||
if plexpy.PYTHON2:
|
||||
script = [s.encode(plexpy.SYS_ENCODING, 'ignore') for s in script]
|
||||
|
||||
logger.debug("Tautulli Notifiers :: Full script is: %s" % script)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue