def run(self):

        data = {'state': 'unknown'}

        try:
            proc = subprocess.Popen(
                ['sudo', '/opt/MegaRAID/MegaCli/MegaCli64', '-LDInfo',
                 '-Lall', '-aALL'],
                stdout=subprocess.PIPE,
                close_fds=True)
            output = proc.communicate()[0]
        except __HOLE__ as exception:
            self.checks_logger.error(
                'Unable to find /opt/MegaRAID/MegaCli/MegaCli64.'
                ' Error: {0}'.format(exception.message))
            return data

        for line in output.split("\n"):
            print line
            if line.startswith('State'):
                data['state'] = line.split(':')[1].replace(' ', '')

        return data
dataset/ETHPy150Open serverdensity/sd-agent-plugins/MegaRAID/MegaRAID.py/MegaRAID.run