diff options
Diffstat (limited to 'python.d/python_modules/bases/FrameworkServices/ExecutableService.py')
-rw-r--r-- | python.d/python_modules/bases/FrameworkServices/ExecutableService.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python.d/python_modules/bases/FrameworkServices/ExecutableService.py b/python.d/python_modules/bases/FrameworkServices/ExecutableService.py index 9b2e945e79..625f643234 100644 --- a/python.d/python_modules/bases/FrameworkServices/ExecutableService.py +++ b/python.d/python_modules/bases/FrameworkServices/ExecutableService.py @@ -17,15 +17,15 @@ class ExecutableService(SimpleService): SimpleService.__init__(self, configuration=configuration, name=name) self.command = None - def _get_raw_data(self, stderr=False): + def _get_raw_data(self, stderr=False, command=None): """ Get raw data from executed command :return: <list> """ try: - p = Popen(self.command, stdout=PIPE, stderr=PIPE) + p = Popen(command if command else self.command, stdout=PIPE, stderr=PIPE) except Exception as error: - self.error('Executing command {command} resulted in error: {error}'.format(command=self.command, + self.error('Executing command {command} resulted in error: {error}'.format(command=command or self.command, error=error)) return None data = list() |