Skip to content

Commit

Permalink
Eliminate unnecessary version check
Browse files Browse the repository at this point in the history
  • Loading branch information
kislyuk committed Jul 26, 2019
1 parent bbf5abc commit 0b8cc71
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/pyotp/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import absolute_import, division, print_function, unicode_literals

import sys
import unicodedata
try:
from itertools import izip_longest
Expand Down Expand Up @@ -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())

0 comments on commit 0b8cc71

Please sign in to comment.