mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-08 06:00:51 -07:00
Refactor test script arg splitting
This commit is contained in:
parent
ae49b08e19
commit
2e290d0b0c
2 changed files with 13 additions and 7 deletions
|
@ -3083,14 +3083,14 @@ class SCRIPTS(Notifier):
|
|||
script = [script]
|
||||
|
||||
# For manual notifications
|
||||
if script_args and isinstance(script_args, basestring):
|
||||
# attemps for format it for the user
|
||||
script_args = [arg for arg in shlex.split(script_args.encode(plexpy.SYS_ENCODING, 'ignore'))]
|
||||
# if script_args and isinstance(script_args, basestring):
|
||||
# # attemps for format it for the user
|
||||
# script_args = [arg for arg in shlex.split(script_args.encode(plexpy.SYS_ENCODING, 'ignore'))]
|
||||
|
||||
# Windows handles unicode very badly.
|
||||
# https://bugs.python.org/issue19264
|
||||
# if script_args and os.name == 'nt':
|
||||
# script_args = [arg.encode(plexpy.SYS_ENCODING, 'ignore') for arg in script_args]
|
||||
if script_args: # and os.name == 'nt':
|
||||
script_args = [arg.encode(plexpy.SYS_ENCODING, 'ignore') for arg in script_args]
|
||||
|
||||
# Allow overrides for shitty systems
|
||||
if prefix and script_args:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue