forked from mirrors/gecko-dev
Bug 1650306 - Address the defects found by the pylint/no-else-return rule. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D82508
This commit is contained in:
parent
c61d108740
commit
6e3170ab3d
3 changed files with 7 additions and 8 deletions
|
|
@ -107,7 +107,6 @@ def get_trailing_blank_line_state(depname):
|
|||
|
||||
if not lines[-1].strip():
|
||||
return "has blank line"
|
||||
else:
|
||||
return "no blank line"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -819,9 +819,9 @@ def keyFromSpecification(specification):
|
|||
"""Pass in a specification, get the appropriate key back."""
|
||||
if specification.startswith('secp'):
|
||||
return ECCKey(specification)
|
||||
else:
|
||||
return RSAKey(specification)
|
||||
|
||||
|
||||
# The build harness will call this function with an output file-like
|
||||
# object and a path to a file containing a specification. This will
|
||||
# read the specification and output the key as ASCII-encoded PKCS #8.
|
||||
|
|
|
|||
|
|
@ -37,13 +37,13 @@ def coseAlgorithmToPykeyHash(algorithm):
|
|||
and returns the corresponding pykey.HASH_* identifier."""
|
||||
if algorithm == ES256:
|
||||
return pykey.HASH_SHA256
|
||||
elif algorithm == ES384:
|
||||
if algorithm == ES384:
|
||||
return pykey.HASH_SHA384
|
||||
elif algorithm == ES512:
|
||||
if algorithm == ES512:
|
||||
return pykey.HASH_SHA512
|
||||
else:
|
||||
raise UnknownCOSEAlgorithmError(algorithm)
|
||||
|
||||
|
||||
# COSE_Signature = [
|
||||
# protected : serialized_map,
|
||||
# unprotected : {},
|
||||
|
|
|
|||
Loading…
Reference in a new issue