about summary refs log tree commit diff
path: root/broadlink
diff options
context:
space:
mode:
authormob41 <puihuenlaw@gmail.com>2017-06-14T02·30+0800
committerMatthew Garrett <mjg59-github@srcf.ucam.org>2017-06-14T02·30-0700
commit2e2c8ef1a15175cf311f757a52e7c561f834f68b (patch)
tree8994ac9ad7ba39509a53994a364b927d38067e1a /broadlink
parentf7e30344c5748e37924c8a4f28522c2bc99a52ee (diff)
[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
Diffstat (limited to 'broadlink')
-rw-r--r--broadlink/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/broadlink/__init__.py b/broadlink/__init__.py
index e757f90005a8..1b65345b47b1 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)):