~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/lp_api.py

  • Committer: Paul Gear
  • Date: 2014-09-12 10:16:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6599.
  • Revision ID: paul.gear@canonical.com-20140912101641-rj89avyjvqiro6gh
Move defaulting of proxy_info inside login

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
        errors.BzrError.__init__(self, branch=branch, url=branch.base)
114
114
 
115
115
 
116
 
def login(service, timeout=None, proxy_info=httplib2.proxy_info_from_environment('https'),
 
116
def login(service, timeout=None, proxy_info=None,
117
117
          version=Launchpad.DEFAULT_VERSION):
118
118
    """Log in to the Launchpad API.
119
119
 
120
120
    :return: The root `Launchpad` object from launchpadlib.
121
121
    """
 
122
    if proxy_info is None:
 
123
        proxy_info = httplib2.proxy_info_from_environment('https')
122
124
    cache_directory = get_cache_directory()
123
125
    launchpad = Launchpad.login_with(
124
126
        'bzr', _get_api_url(service), cache_directory, timeout=timeout,