diff --git a/ccnode/host/__init__.py b/ccnode/host/__init__.py index ff36df9806dc68b9eb9716aad2384dea9dfe5cef..9ee1d36f8f211eb88a7df6d2db14122fd77d53b1 100644 --- a/ccnode/host/__init__.py +++ b/ccnode/host/__init__.py @@ -52,8 +52,12 @@ class Handler(BasePlugin): :param string command: shell command to run """ # return stdout and stderr mixed in - return Popen(command, shell=True, bufsize=-1, stdin=PIPE, stdout=PIPE, - stderr=STDOUT).communicate()[0] or None + try: + return Popen(command, shell=True, bufsize=-1, stdin=PIPE, stdout=PIPE, + stderr=STDOUT).communicate()[0] or None + except Exception: + logger.exception('Error while executing a remote command') + raise def node_shutdown(self, reboot=True, gracefull=True): """Halt/Reboot the node.