From: Sergey Matveev Date: Thu, 26 Sep 2019 10:03:39 +0000 (+0300) Subject: Fix defines_by_path example usage X-Git-Tag: 5.3~2 X-Git-Url: http://www.git.cypherpunks.ru/?p=pyderasn.git;a=commitdiff_plain;h=165e97910a69809f2a7dcc852b0229d0aa1ff157 Fix defines_by_path example usage --- diff --git a/pyderasn.py b/pyderasn.py index 887f000..3868b61 100755 --- a/pyderasn.py +++ b/pyderasn.py @@ -429,7 +429,7 @@ For example, again for CMS, you want to automatically decode structures it may hold. Also, automatically decode ``controlSequence`` of ``PKIResponse``:: - content_info, tail = ContentInfo().decode(data, defines_by_path=( + content_info, tail = ContentInfo().decode(data, ctx={"defines_by_path": ( ( ("contentType",), ((("content",), {id_signedData: SignedData()}),), @@ -464,7 +464,7 @@ of ``PKIResponse``:: id_cmc_transactionId: TransactionId(), })), ), - )) + )}) Pay attention for :py:class:`pyderasn.DecodePathDefBy` and ``any``. First function is useful for path construction when some automatic