From 0b8cc7101f53165554d37bf244f632a4c399932d Mon Sep 17 00:00:00 2001 From: Andrey Kislyuk Date: Fri, 26 Jul 2019 09:48:15 -0700 Subject: [PATCH] Eliminate unnecessary version check --- src/pyotp/utils.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pyotp/utils.py b/src/pyotp/utils.py index 5f6e548..cd97865 100644 --- a/src/pyotp/utils.py +++ b/src/pyotp/utils.py @@ -1,6 +1,5 @@ from __future__ import absolute_import, division, print_function, unicode_literals -import sys import unicodedata try: from itertools import izip_longest @@ -107,7 +106,4 @@ def strings_equal(s1, s2): """ s1 = unicodedata.normalize('NFKC', s1) s2 = unicodedata.normalize('NFKC', s2) - if sys.version.startswith('3'): - return compare_digest(s1.encode(), s2.encode()) - else: - return compare_digest(s1, s2) + return compare_digest(s1.encode(), s2.encode())