Fix TP-Link device tracker regression since 0.49 (#8497)

* Fix TP-Link device tracker regression since 0.49

This regression was introduced by #8322.

Fix is to utf encode the password like the other TP-Link backends do.

* Fix linting issue introduced in previous commit

Commit in question: 677f3fbb7f
pull/8511/head
Maikel Wever 2017-07-16 19:27:48 +02:00 committed by Paulus Schoutsen
parent d29bdddaa7
commit f6c3832e90
1 changed files with 2 additions and 1 deletions

View File

@ -391,7 +391,8 @@ class Tplink5DeviceScanner(TplinkDeviceScanner):
"Cache-Control": "no-cache" "Cache-Control": "no-cache"
} }
password_md5 = hashlib.md5(self.password).hexdigest().upper() password_md5 = hashlib.md5(
self.password.encode('utf')).hexdigest().upper()
# create a session to handle cookie easier # create a session to handle cookie easier
session = requests.session() session = requests.session()