'Utility function that runs a command and returns command output'

def _run_get_output(self, arguments):

    if self.debug_run:
        self.log.debug('running:    "%s"', '    '.join(arguments))
    result = None
    try:
        result = subprocess.Popen(arguments, shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True).stdout.read()
    except:
        pass
    if (result is not None):
        result = result.strip()
        if self.debug_run:
            logging.debug('previous    command    output:    "%s"', result)
    else:
        self.log.error('_run_get_output    error    while    running:    "%s"', '    '.join(arguments))
    return result
