diff -r 22a46f05ce23 Lib/urllib2.py --- a/Lib/urllib2.py Wed Sep 24 20:22:24 2014 -0400 +++ b/Lib/urllib2.py Thu Sep 25 15:20:18 2014 +0200 @@ -1045,7 +1045,8 @@ H = lambda x: hashlib.md5(x).hexdigest() elif algorithm == 'SHA': H = lambda x: hashlib.sha1(x).hexdigest() - # XXX MD5-sess + else: # MD5-sess + raise NotImplementedError("Unsupported Digest Authentication Algorithm '%s'" % algorithm) KD = lambda s, d: H("%s:%s" % (s, d)) return H, KD