From 5d9fb2894d3b05bcfa4a2c73d4c82dbef8831d76 Mon Sep 17 00:00:00 2001 From: Peter Szabo Date: Mon, 25 Jan 2016 20:14:39 +0100 Subject: [PATCH] fixed remaining python 3.5 incompatibility --- tools/espota.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/espota.py b/tools/espota.py index f273ecee1..412a50f5c 100755 --- a/tools/espota.py +++ b/tools/espota.py @@ -104,10 +104,10 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm if(data.startswith('AUTH')): nonce = data.split()[1] cnonce_text = '%s%u%s%s' % (filename, content_size, file_md5, remoteAddr) - cnonce = hashlib.md5(cnonce_text).hexdigest() - passmd5 = hashlib.md5(password).hexdigest() + cnonce = hashlib.md5(cnonce_text.encode()).hexdigest() + passmd5 = hashlib.md5(password.encode()).hexdigest() result_text = '%s:%s:%s' % (passmd5 ,nonce, cnonce) - result = hashlib.md5(result_text).hexdigest() + result = hashlib.md5(result_text.encode()).hexdigest() sys.stderr.write('Authenticating...') sys.stderr.flush() message = '%d %s %s\n' % (AUTH, cnonce, result)