Removed "" and changed the call to check_call to make it race the appropriate error
This commit is contained in:
1 parent
10a20f802b
commit
5a03ddd7e0
1 file changed
+4
-3
@@ -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)
|
||||
Reference in new issue
Block a user