Skip to content

Commit

Permalink
# noqa on unicode
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jun 3, 2019
1 parent 3b17345 commit 266d7c9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Linux/lazagne/config/crypto/pyDes.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@

import sys

try:
unicode
except NameError:
unicode = str

# _pythonMajorVersion is used to handle Python2 and Python3 differences.
_pythonMajorVersion = sys.version_info[0]

Expand Down Expand Up @@ -235,7 +230,7 @@ def _guardAgainstUnicode(self, data):
# Only accept byte strings or ascii unicode values, otherwise
# there is no way to correctly decode the data into bytes.
if _pythonMajorVersion < 3:
if isinstance(data, unicode):
if isinstance(data, unicode): # noqa
raise ValueError("pyDes can only work with bytes, not Unicode strings.")
else:
if isinstance(data, str):
Expand Down

0 comments on commit 266d7c9

Please sign in to comment.