diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2023-01-09 21:29:04 -0500 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2023-01-09 23:26:00 -0500 |
commit | 74eae059e2ae71044e31a580bc4ede1057c0053b (patch) | |
tree | 8c26afc3ce0c0c6494352791fd79b59ad222fb7f /tests/util.py | |
parent | 4495c4054233c5f7b3c4ffb3fb52ca525bc0d983 (diff) |
Remove py3compat.PY2, including related streamlining
Diffstat (limited to 'tests/util.py')
-rw-r--r-- | tests/util.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/util.py b/tests/util.py index 3ec5d092..951b86ce 100644 --- a/tests/util.py +++ b/tests/util.py @@ -6,7 +6,7 @@ import unittest import pytest -from paramiko.py3compat import builtins, PY2 +from paramiko.py3compat import builtins from paramiko.ssh_gss import GSS_AUTH_AVAILABLE from cryptography.exceptions import UnsupportedAlgorithm, _Reasons @@ -142,12 +142,9 @@ def is_low_entropy(): the hash seed set to zero under Python 3. """ is_32bit = struct.calcsize("P") == 32 / 8 - if PY2: - return is_32bit - else: - # I don't see a way to tell internally if the hash seed was set this - # way, but env should be plenty sufficient, this is only for testing. - return is_32bit and os.environ.get("PYTHONHASHSEED", None) == "0" + # I don't see a way to tell internally if the hash seed was set this + # way, but env should be plenty sufficient, this is only for testing. + return is_32bit and os.environ.get("PYTHONHASHSEED", None) == "0" def sha1_signing_unsupported(): |