Skip to content

Commit

Permalink
Use os.getenv() instead of os.environ
Browse files Browse the repository at this point in the history
If ECDSAP256SHA256_SUPPORTED or ECDSAP384SHA384_SUPPORTED variables were
not present in the environment, os.environ would raise KeyError that is
not being handled in the decorator. Use os.getenv() instead.
  • Loading branch information
Mno-hime committed Dec 5, 2024
1 parent 2a7b8d9 commit 1a5683b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/tests/system/ecdsa/tests_ecdsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def check_server_soa(resolver):


@pytest.mark.skipif(
not os.environ["ECDSAP256SHA256_SUPPORTED"],
not os.getenv("ECDSAP256SHA256_SUPPORTED"),
reason="algorithm ECDSA256 not supported",
)
def test_ecdsa256():
check_server_soa("10.53.0.2")


@pytest.mark.skipif(
not os.environ["ECDSAP384SHA384_SUPPORTED"],
not os.getenv("ECDSAP384SHA384_SUPPORTED"),
reason="algorithm ECDSA384 not supported",
)
def test_ecdsa384():
Expand Down

0 comments on commit 1a5683b

Please sign in to comment.