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

Method _callSubstrateFunV4asV5

pager_lib/pyasn1/codec/ber/decoder.py:2136–2144  ·  view source on GitHub ↗
(substrateFunV4, asn1Object, substrate, length)

Source from the content-addressed store, hash-verified

2134
2135 @staticmethod
2136 def _callSubstrateFunV4asV5(substrateFunV4, asn1Object, substrate, length):
2137 substrate_bytes = substrate.read()
2138 if length == -1:
2139 length = len(substrate_bytes)
2140 value, nextSubstrate = substrateFunV4(asn1Object, substrate_bytes, length)
2141 nbytes = substrate.write(nextSubstrate)
2142 substrate.truncate()
2143 substrate.seek(-nbytes, os.SEEK_CUR)
2144 yield value
2145
2146#: Turns BER octet stream into an ASN.1 object.
2147#:

Callers 1

substrateFunWrapperMethod · 0.80

Calls 3

seekMethod · 0.80
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected