Work around constraint in python 3.4 when using HMAC

https://bugs.python.org/issue18240

Signed-off-by: Alexander Clouter <alex@digriz.org.uk>
This commit is contained in:
Alexander Clouter 2016-06-14 18:26:38 +01:00
parent 3a5becf6a7
commit cedc8eb020
No known key found for this signature in database
GPG Key ID: DE1F3ADBED9EFF6B
1 changed files with 1 additions and 1 deletions

View File

@ -198,7 +198,7 @@ class IMAPServer(object):
challenge = response.strip()
self.ui.debug('imap', '__md5handler: got challenge %s'% challenge)
passwd = self.__getpassword()
passwd = self.__getpassword().encode('ascii')
retval = self.username + ' ' + hmac.new(passwd, challenge).hexdigest()
self.ui.debug('imap', '__md5handler: returning %s'% retval)
return retval