(self)
Generate the compiled (.py) MIB file
Generate the compiled (.py) MIB file
Generate the compiled ( . py ) MIB file
def _dump_mib(self):
        """Generate the compiled (.py) MIB file"""

        # Check if the compiled MIB (.py file) already exists
        home = util.get_home_dir()
        self.mib_dir = mib_dir = os.path.join(home, ".pysnmp/mibs/")
        if (os.path.exists(os.path.join(mib_dir, self.mib + ".py"))):
            return

        cli_dir = os.path.dirname(os.path.abspath(__file__))
        mib_path = os.path.join(cli_dir, "mib")
        cmd = ["mibdump.py", "--mib-source={}".format(mib_path), self.mib]
        runner.run(cmd)
def _dump_mib ( self ) : # Check if the compiled MIB (.py file) already exists home = util . get_home_dir ( ) self . mib_dir = mib_dir = os . path . join ( home , ".pysnmp/mibs/" ) if ( os . path . exists ( os . path . join ( mib_dir , self . mib + ".py" ) ) ) : return cli_dir = os . path . dirname ( os . path . abspath ( __file__ ) ) mib_path = os . path . join ( cli_dir , "mib" ) cmd = [ "mibdump.py" , "--mib-source={}" . format ( mib_path ) , self . mib ] runner . run ( cmd )