(self, cmd, input_text=None, timeout=None, echo=True, fatal=False, loud=False, loose=False, want_output=False, ignore_lines=None, primary=False)
return res
Common helper code for test and run
Common helper code for test and run
Common helper code for test and run
def _handle_cmd(self, cmd, input_text=None, timeout=None, echo=True, fatal=False, loud=False, loose=False, want_output=False, ignore_lines=None, primary=False):
        """ Common helper code for test and run """
        cmd = self.get_command(cmd, input_text=input_text, timeout=timeout, echo=echo, fatal=fatal, loud=loud, ignore_lines=ignore_lines, primary=primary)
        res = cmd.execute()
        if want_output:
            if res.rc == 0 or loose:
                return res.data.rstrip()
            else:
                return None
        return res
def _handle_cmd ( self , cmd , input_text = None , timeout = None , echo = True , fatal = False , loud = False , loose = False , want_output = False , ignore_lines = None , primary = False ) : cmd = self . get_command ( cmd , input_text = input_text , timeout = timeout , echo = echo , fatal = fatal , loud = loud , ignore_lines = ignore_lines , primary = primary ) res = cmd . execute ( ) if want_output : if res . rc == 0 or loose : return res . data . rstrip ( ) else : return None return res