From: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> Date: Sun, 26 Sep 2021 13:15:36 +0000 (+0200) Subject: Do not use `type` as a variable name X-Git-Tag: v9.00~62^2~12 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=034c05d4658f0065144f84e5c4a509e47413619b;p=users%2Fdwmw2%2Fopenconnect.git Do not use `type` as a variable name This fixes a DeepSource alert: Re-definition found for builtin function Defining a local variable or function with the same name as a built-in object makes the built-in object unusable within the current scope and makes the code prone to bugs. Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com> --- diff --git a/trojans/tncc-emulate.py b/trojans/tncc-emulate.py index dcbbc305..7a876a42 100755 --- a/trojans/tncc-emulate.py +++ b/trojans/tncc-emulate.py @@ -277,9 +277,9 @@ class x509cert: ret = dict() for name in names.chosen: for attr in name: - type = attr['type'].dotted # dotted-quad value (e.g. '2.5.4.10' = organization) - value = attr['value'].native # literal string value (e.g. 'Bigcorp Inc.') - ret.setdefault(type, []).append(value) + type_dotted = attr['type'].dotted # dotted-quad value (e.g. '2.5.4.10' = organization) + value_native = attr['value'].native # literal string value (e.g. 'Bigcorp Inc.') + ret.setdefault(type_dotted, []).append(value_native) return ret def __init__(self, cert_file):