/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/http_utils.py

  • Committer: Jelmer Vernooij
  • Date: 2017-10-26 11:10:38 UTC
  • mfrom: (6791.2.7 python3)
  • Revision ID: jelmer@jelmer.uk-20171026111038-cvils4aykn7ffcju
Merge lp:~jelmer/brz/fix-imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
import re
18
 
import urllib2
 
18
try:
 
19
    from urllib.request import (
 
20
        parse_http_list,
 
21
        parse_keqv_list,
 
22
        )
 
23
except ImportError:  # python < 3
 
24
    from urllib2 import (
 
25
        parse_http_list,
 
26
        parse_keqv_list,
 
27
        )
19
28
 
20
29
 
21
30
from .. import (
354
363
            return False
355
364
        scheme, auth = auth_header.split(None, 1)
356
365
        if scheme.lower() == tcs.auth_scheme:
357
 
            auth_dict = urllib2.parse_keqv_list(urllib2.parse_http_list(auth))
 
366
            auth_dict = parse_keqv_list(parse_http_list(auth))
358
367
 
359
368
            return tcs.digest_authorized(auth_dict, self.command)
360
369