MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / prettyPrint

Method prettyPrint

pager_lib/pyasn1/type/univ.py:862–877  ·  view source on GitHub ↗
(self, scope=0)

Source from the content-addressed store, hash-verified

860 return value
861
862 def prettyPrint(self, scope=0):
863 # first see if subclass has its own .prettyOut()
864 value = self.prettyOut(self._value)
865
866 if value is not self._value:
867 return value
868
869 numbers = self.asNumbers()
870
871 for x in numbers:
872 # hexify if needed
873 if x < 32 or x > 126:
874 return '0x' + ''.join(('%.2x' % x for x in numbers))
875 else:
876 # this prevents infinite recursion
877 return OctetString.__str__(self)
878
879 @staticmethod
880 def fromBinaryString(value):

Callers

nothing calls this directly

Calls 3

prettyOutMethod · 0.95
asNumbersMethod · 0.95
__str__Method · 0.45

Tested by

no test coverage detected