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:
Manish Giri 2020-07-08 09:24:49 +00:00
parent c61d108740
commit 6e3170ab3d
3 changed files with 7 additions and 8 deletions

View file

@ -107,8 +107,7 @@ def get_trailing_blank_line_state(depname):
if not lines[-1].strip():
return "has blank line"
else:
return "no blank line"
return "no blank line"
def update_nspr_or_nss(tag, depfile, destination, hgpath):

View file

@ -819,8 +819,8 @@ def keyFromSpecification(specification):
"""Pass in a specification, get the appropriate key back."""
if specification.startswith('secp'):
return ECCKey(specification)
else:
return RSAKey(specification)
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

View file

@ -37,12 +37,12 @@ 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)
raise UnknownCOSEAlgorithmError(algorithm)
# COSE_Signature = [
# protected : serialized_map,