Skip to content

Commit b2540ef

Browse files
authored
remove dubious eval
1 parent da3a3e3 commit b2540ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_hmac.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def assert_hmac_extra_cases(
761761
):
762762
# assert one-shot HMAC at the same time
763763
with self.subTest(key=key, msg=msg, hashname=hashname):
764-
func = eval(f'self.hmac.compute_{hashname}')
764+
func = getattr(self.hmac, f'compute_{hashname}')
765765
self.assertTrue(callable(func))
766766
self.check_hmac_hexdigest(key, msg, hexdigest, digest_size, func)
767767

0 commit comments

Comments
 (0)