X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=pyderasn.py;h=ced46ddeb0f4fde4ca6f9be75120e9d1d421e1c2;hb=287f77ca2cf0b62db54e199ca1b5c16c93c3624e;hp=5292c5cf70fb5d195a39efde500a8b9a6f7cc443;hpb=2272ffa91af327f530aae0a3a38e55955c5ddac6;p=pyderasn.git diff --git a/pyderasn.py b/pyderasn.py index 5292c5c..ced46dd 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -428,7 +428,7 @@ defines_by_path context option ______________________________ Sometimes you either can not or do not want to explicitly set *defines* -in the scheme. You can dynamically apply those definitions when calling +in the schema. You can dynamically apply those definitions when calling ``.decode()`` method. Specify ``defines_by_path`` key in the :ref:`decode context `. Its @@ -671,7 +671,6 @@ from copy import copy from datetime import datetime from datetime import timedelta from math import ceil -from os import environ from string import ascii_letters from string import digits from sys import version_info @@ -1229,7 +1228,7 @@ class Obj(object): :param ctx: optional :ref:`context ` governing decoding process :param tag_only: decode only the tag, without length and contents (used only in Choice and Set structures, trying to - determine if tag satisfies the scheme) + determine if tag satisfies the schema) :param _ctx_immutable: do we need to ``copy.copy()`` ``ctx`` before using it? :returns: (Obj, remaining data) @@ -6374,6 +6373,7 @@ def main(): # pragma: no cover if args.defines_by_path is not None: ctx["defines_by_path"] = obj_by_path(args.defines_by_path) obj, tail = schema().decode(der, ctx=ctx) + from os import environ print(pprinter( obj, oid_maps=oid_maps,