~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_urllib2_wrappers.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-12 07:05:53 UTC
  • mto: This revision was merged to the branch mainline in revision 5852.
  • Revision ID: jelmer@samba.org-20110512070553-x70rfcavxm3zumad
Simplify call to sha_string.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1402
1402
    if algorithm == 'MD5':
1403
1403
        H = lambda x: osutils.md5(x).hexdigest()
1404
1404
    elif algorithm == 'SHA':
1405
 
        H = lambda x: osutils.sha_string(x)
 
1405
        H = osutils.sha_string
1406
1406
    if H is not None:
1407
1407
        KD = lambda secret, data: H("%s:%s" % (secret, data))
1408
1408
    return H, KD