From 5a03ddd7e0e9bf947c29d442cff3cb058a8cce31 Mon Sep 17 00:00:00 2001 From: Stefan Jonasson Date: Fri, 12 Feb 2016 19:31:28 +0100 Subject: [PATCH] Removed "" and changed the call to check_call to make it race the appropriate error --- homeassistant/components/notify/command_line.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/notify/command_line.py b/homeassistant/components/notify/command_line.py index 2beb78ccdca..aa753e4f02f 100644 --- a/homeassistant/components/notify/command_line.py +++ b/homeassistant/components/notify/command_line.py @@ -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)