Skip to content

Commit

Permalink
Use isinstance instead of type comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Dec 11, 2023
1 parent f66913a commit d4b2bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion signxml/verifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ def verify(
for idx, reference in enumerate(self._findall(signed_info, "Reference")):
verify_results.append(self._verify_reference(reference, idx, root, uri_resolver, c14n_algorithm, signature))

if type(self.config.expect_references) is int and len(verify_results) != self.config.expect_references:
if isinstance(self.config.expect_references, int) and len(verify_results) != self.config.expect_references:
msg = "Expected to find {} references, but found {}"
raise InvalidSignature(msg.format(self.config.expect_references, len(verify_results)))

Expand Down

0 comments on commit d4b2bae

Please sign in to comment.