/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.py

  • Committer: Jelmer Vernooij
  • Date: 2019-12-23 01:39:21 UTC
  • mfrom: (7424 work)
  • mto: This revision was merged to the branch mainline in revision 7425.
  • Revision ID: jelmer@jelmer.uk-20191223013921-2kzd0wlcoylgxksk
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
from ... import (
39
39
    branch,
40
 
    config,
 
40
    bedding,
41
41
    errors,
42
42
    osutils,
43
43
    trace,
71
71
 
72
72
def get_cache_directory():
73
73
    """Return the directory to cache launchpadlib objects in."""
74
 
    return osutils.pathjoin(config.config_dir(), 'launchpad')
 
74
    return osutils.pathjoin(bedding.cache_dir(), 'launchpad')
75
75
 
76
76
 
77
77
def parse_launchpadlib_version(version_number):
115
115
    if proxy_info is None:
116
116
        import httplib2
117
117
        proxy_info = httplib2.proxy_info_from_environment('https')
118
 
    cache_directory = get_cache_directory()
 
118
    try:
 
119
        cache_directory = get_cache_directory()
 
120
    except EnvironmentError:
 
121
        cache_directory = None
119
122
    return Launchpad.login_with(
120
123
        'breezy', base_url, cache_directory, timeout=timeout,
121
124
        proxy_info=proxy_info, version=version)