Skip to content

Commit

Permalink
поддержка бинарных данных
Browse files Browse the repository at this point in the history
  • Loading branch information
telminov committed Nov 28, 2017
1 parent 43190af commit 68f9761
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='sw-python-utils',
version='0.0.16',
version='0.0.17',
description='Soft Way company python utils.',
author='Telminov Sergey',
url='https://github.com/telminov/sw-python-utils',
Expand Down
5 changes: 4 additions & 1 deletion swutils/encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ def _unpad(text):
try:
text = text.decode('utf-8')
except UnicodeDecodeError:
text = text.decode('cp1251')
try:
text = text.decode('cp1251')
except UnicodeDecodeError:
return text
return text[0:-ord(text[-1])]

0 comments on commit 68f9761

Please sign in to comment.