From 2e2c8ef1a15175cf311f757a52e7c561f834f68b Mon Sep 17 00:00:00 2001 From: mob41 Date: Wed, 14 Jun 2017 10:30:27 +0800 Subject: [PATCH] [Critical] Fixes invalid byte string (b) for padding (#97, #107) (#108) * Fixes invalid byte string (b) for padding (#97, #107) * Change version to 0.5 --- broadlink/__init__.py | 2 +- setup.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/broadlink/__init__.py b/broadlink/__init__.py index e757f90..1b65345 100644 --- a/broadlink/__init__.py +++ b/broadlink/__init__.py @@ -248,7 +248,7 @@ class device: # pad the payload for AES encryption if len(payload)>0: numpad=(len(payload)//16+1)*16 - payload=payload.ljust(numpad,"\x00") + payload=payload.ljust(numpad,b"\x00") checksum = 0xbeaf for i in range(len(payload)): diff --git a/setup.py b/setup.py index ed627fe..1971c92 100644 --- a/setup.py +++ b/setup.py @@ -12,11 +12,11 @@ try: except ImportError as e: dynamic_requires = ['pycrypto==2.6.1'] -version = 0.3 +version = 0.5 setup( name='broadlink', - version=0.4, + version=0.5, author='Matthew Garrett', author_email='mjg59@srcf.ucam.org', url='http://github.com/mjg59/python-broadlink',