/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/plugins/launchpad/lp_api_lite.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-06-30 23:11:39 UTC
  • mfrom: (6973.12.13 python3-k)
  • Revision ID: breezy.the.bot@gmail.com-20180630231139-tf5t5khh6bu5ntpm
Fix some more tests on python3.

Merged from https://code.launchpad.net/~jelmer/brz/python3-k/+merge/348646

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
        json = None
37
37
 
38
38
import time
39
 
import urllib
40
 
try:
 
39
try:
 
40
    from urllib.parse import urlencode
 
41
except ImportError:  # python < 3
 
42
    from urllib import urlencode
 
43
try:
 
44
    import urllib.request as urllib2
 
45
except ImportError:  # python < 3
41
46
    import urllib2
42
 
except ImportError:  # python >= 3
43
 
    import urllib.request as urllib2
44
47
 
45
48
from ... import (
46
49
    revision,
115
118
        """Create the full URL that we need to query, including parameters."""
116
119
        params = self._query_params()
117
120
        # We sort to give deterministic results for testing
118
 
        encoded = urllib.urlencode(sorted(params.items()))
 
121
        encoded = urlencode(sorted(params.items()))
119
122
        return '%s?%s' % (self._archive_URL(), encoded)
120
123
 
121
124
    def _get_lp_info(self):