(self, cmd, root_path, action=BIN)
return status
Execute a shell command over each executable file in a given
        dir_path, action can be ABORT_ON_ERROR, return upon first success
        ONE_SUCCESS, or return upon the first non empty output. #f is the
        placeholder for the filename.
Execute a shell command over each executable file in a given
        dir_path, action can be ABORT_ON_ERROR, return upon first success
        ONE_SUCCESS, or return upon the first non empty output. #f is the
        placeholder for the filename.
Execute a shell command over each executable file in a given dir_path action can be ABORT_ON_ERROR return upon first success ONE_SUCCESS or return upon the first non empty output . #f is the placeholder for the filename .
def _walk_fs(self, cmd, root_path, action=BIN):
        """Execute a shell command over each executable file in a given
        dir_path, action can be ABORT_ON_ERROR, return upon first success
        ONE_SUCCESS, or return upon the first non empty output. #f is the
        placeholder for the filename.
        """
        status = ""
        for dir_path, dummy, files in os.walk(root_path):
            for f_name in files:
                try:
                    f_path = dir_path + '/' + f_name
                    if os.path.islink(f_path):
                        continue

                    if os.stat(f_path).st_uid != self._uid:
                        if action & self.ABORT_ON_ERROR:
                            return ""

                        continue

                    if ((action & self.BIN and os.access(f_path, os.X_OK)) or
                            (action & self.LIB and self._shlib.match(f_name))):
                        out = Uprocess().get_output(self._replace(cmd, f_path))
                        if out:
                            status = out

                    if action & self.ABORT_ON_ERROR and status is None:
                        return ""

                    if action & self.ONE_SUCCESS and status is not None:
                        return status

                    if action & self.ONE_OUTPUT and status:
                        return status

                except OSError:
                    pass

        return status
def _walk_fs ( self , cmd , root_path , action = BIN ) : status = "" for dir_path , dummy , files in os . walk ( root_path ) : for f_name in files : try : f_path = dir_path + '/' + f_name if os . path . islink ( f_path ) : continue if os . stat ( f_path ) . st_uid != self . _uid : if action & self . ABORT_ON_ERROR : return "" continue if ( ( action & self . BIN and os . access ( f_path , os . X_OK ) ) or ( action & self . LIB and self . _shlib . match ( f_name ) ) ) : out = Uprocess ( ) . get_output ( self . _replace ( cmd , f_path ) ) if out : status = out if action & self . ABORT_ON_ERROR and status is None : return "" if action & self . ONE_SUCCESS and status is not None : return status if action & self . ONE_OUTPUT and status : return status except OSError : pass return status