mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-12 08:16:06 -07:00
Proper splitting for script arguments
This commit is contained in:
parent
70b6bd4efd
commit
215514947b
1 changed files with 2 additions and 1 deletions
|
@ -23,6 +23,7 @@ import json
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import shlex
|
||||||
from string import Formatter
|
from string import Formatter
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
@ -1027,7 +1028,7 @@ def build_notify_text(subject='', body='', notify_action=None, parameters=None,
|
||||||
|
|
||||||
if agent_id == 15:
|
if agent_id == 15:
|
||||||
try:
|
try:
|
||||||
script_args = [custom_formatter.format(unicode(arg), **parameters) for arg in subject.split()]
|
script_args = [custom_formatter.format(unicode(arg), **parameters) for arg in shlex.split(subject)]
|
||||||
except LookupError as e:
|
except LookupError as e:
|
||||||
logger.error(u"Tautulli NotificationHandler :: Unable to parse parameter %s in script argument. Using fallback." % e)
|
logger.error(u"Tautulli NotificationHandler :: Unable to parse parameter %s in script argument. Using fallback." % e)
|
||||||
script_args = []
|
script_args = []
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue