From c25e31463e162a3d89b84d39c1d273c0e61b2fe9 Mon Sep 17 00:00:00 2001 From: Sebastien Awwad Date: Thu, 8 Nov 2018 17:20:27 -0500 Subject: [PATCH] ASN.1: minor: add quotes around a datatype in an err string and remove commented-out pyasn1 imports. Signed-off-by: Sebastien Awwad --- tests/test_asn1_convert.py | 6 ------ tuf/encoding/asn1_convert.py | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/test_asn1_convert.py b/tests/test_asn1_convert.py index 3e1ca0fef4..ab795cbad1 100644 --- a/tests/test_asn1_convert.py +++ b/tests/test_asn1_convert.py @@ -33,12 +33,6 @@ # Dependency Imports import asn1crypto as asn1 import asn1crypto.core as asn1_core -''' -import pyasn1 -import pyasn1.type.univ as pyasn1_univ -import pyasn1.type.char as pyasn1_char -import pyasn1.codec.der.encoder as pyasn1_der_encoder -''' # TUF Imports import tuf import tuf.log diff --git a/tuf/encoding/asn1_convert.py b/tuf/encoding/asn1_convert.py index 35552befd9..c3c6f09b42 100644 --- a/tuf/encoding/asn1_convert.py +++ b/tuf/encoding/asn1_convert.py @@ -656,8 +656,8 @@ def _structlike_dict_to_asn1(data, datatype): continue else: raise tuf.exceptions.ASN1ConversionError( - 'In conversion to "' + str(datatype) + '", expected to find key ' + - element_name_py + ' in input data, but did not. Keys in input ' + 'In conversion to "' + str(datatype) + '", expected to find key "' + + element_name_py + '" in input data, but did not. Keys in input ' 'data: ' + str(data.keys())) debug('In conversion of dict to type ' + str(datatype) + ', recursing '