diff options
Diffstat (limited to 'tools/docs/crypto/crypto_docs.py')
-rw-r--r-- | tools/docs/crypto/crypto_docs.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/docs/crypto/crypto_docs.py b/tools/docs/crypto/crypto_docs.py index d1f220dc87..482e38e9d4 100644 --- a/tools/docs/crypto/crypto_docs.py +++ b/tools/docs/crypto/crypto_docs.py @@ -29,3 +29,11 @@ def load_json(filename): data = json.loads(stripped_contents) f.close() return data + + +def find_by_name(seq, name): + """Returns the first element in seq with the given name.""" + for item in seq: + if item['name'] == name: + return item + return None |