Skip to content

Commit 017dbc0

Browse files
committed
Merge pull request esp8266#1500 from asdwsda/master
espota: fixed remaining python 3.5 incompatibility
2 parents 74da596 + 5d9fb28 commit 017dbc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/espota.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ def serve(remoteAddr, localAddr, remotePort, localPort, password, filename, comm
104104
if(data.startswith('AUTH')):
105105
nonce = data.split()[1]
106106
cnonce_text = '%s%u%s%s' % (filename, content_size, file_md5, remoteAddr)
107-
cnonce = hashlib.md5(cnonce_text).hexdigest()
108-
passmd5 = hashlib.md5(password).hexdigest()
107+
cnonce = hashlib.md5(cnonce_text.encode()).hexdigest()
108+
passmd5 = hashlib.md5(password.encode()).hexdigest()
109109
result_text = '%s:%s:%s' % (passmd5 ,nonce, cnonce)
110-
result = hashlib.md5(result_text).hexdigest()
110+
result = hashlib.md5(result_text.encode()).hexdigest()
111111
sys.stderr.write('Authenticating...')
112112
sys.stderr.flush()
113113
message = '%d %s %s\n' % (AUTH, cnonce, result)

0 commit comments

Comments
 (0)