mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Removed "" and changed the call to check_call to make it race the appropriate error
This commit is contained in:
parent
10a20f802b
commit
5a03ddd7e0
@ -39,8 +39,9 @@ class CommandLineNotificationService(BaseNotificationService):
|
|||||||
def send_message(self, message="", **kwargs):
|
def send_message(self, message="", **kwargs):
|
||||||
""" Send a message to a command_line. """
|
""" Send a message to a command_line. """
|
||||||
try:
|
try:
|
||||||
subprocess.call("{} \"{}\"".format(self.command,
|
subprocess.check_call(
|
||||||
shlex.quote(message)),
|
"{} {}".format(self.command,
|
||||||
shell=True)
|
shlex.quote(message)),
|
||||||
|
shell=True)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
_LOGGER.error('Command failed: %s', self.command)
|
_LOGGER.error('Command failed: %s', self.command)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user