(self, oid)
Display an OID object (or MIB symbol), even if the object is not initialized by PySNMP.

        Output:
            1.3.4.8.3.4
Display an OID object (or MIB symbol), even if the object is not initialized by PySNMP.
Display an OID object ( or MIB symbol ) even if the object is not initialized by PySNMP .
def oid_str(self, oid):
        # type: (ObjectType) -> str
        """Display an OID object (or MIB symbol), even if the object is not initialized by PySNMP.

        Output:
            1.3.4.8.3.4
        """
        try:
            return oid[0].getOid().prettyPrint()
        except SmiError:
            # PySNMP screams when we try to access the name of an OID
            # that has no value yet. Fine, let's work around this arbitrary limitation...
            arg = oid._ObjectType__args[0]._ObjectIdentity__args[-1]
            if isinstance(arg, tuple):
                arg = '.'.join(map(str, arg))

            return arg
def oid_str ( self , oid ) : # type: (ObjectType) -> str try : return oid [ 0 ] . getOid ( ) . prettyPrint ( ) except SmiError : # PySNMP screams when we try to access the name of an OID # that has no value yet. Fine, let's work around this arbitrary limitation... arg = oid . _ObjectType__args [ 0 ] . _ObjectIdentity__args [ - 1 ] if isinstance ( arg , tuple ) : arg = '.' . join ( map ( str , arg ) ) return arg