Skip to content

Commit 2e2c8ef

Browse files
a1awmjg59
authored andcommitted
[Critical] Fixes invalid byte string (b) for padding (mjg59#97, mjg59#107) (mjg59#108)
* Fixes invalid byte string (b) for padding (mjg59#97, mjg59#107) * Change version to 0.5
1 parent f7e3034 commit 2e2c8ef

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

broadlink/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ def send_packet(self, command, payload):
248248
# pad the payload for AES encryption
249249
if len(payload)>0:
250250
numpad=(len(payload)//16+1)*16
251-
payload=payload.ljust(numpad,"\x00")
251+
payload=payload.ljust(numpad,b"\x00")
252252

253253
checksum = 0xbeaf
254254
for i in range(len(payload)):

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
except ImportError as e:
1313
dynamic_requires = ['pycrypto==2.6.1']
1414

15-
version = 0.3
15+
version = 0.5
1616

1717
setup(
1818
name='broadlink',
19-
version=0.4,
19+
version=0.5,
2020
author='Matthew Garrett',
2121
author_email='mjg59@srcf.ucam.org',
2222
url='http://github.com/mjg59/python-broadlink',

0 commit comments

Comments
 (0)