mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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):
|
||||
""" Send a message to a command_line. """
|
||||
try:
|
||||
subprocess.call("{} \"{}\"".format(self.command,
|
||||
shlex.quote(message)),
|
||||
shell=True)
|
||||
subprocess.check_call(
|
||||
"{} {}".format(self.command,
|
||||
shlex.quote(message)),
|
||||
shell=True)
|
||||
except subprocess.CalledProcessError:
|
||||
_LOGGER.error('Command failed: %s', self.command)
|
||||
|
Loading…
x
Reference in New Issue
Block a user