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

  • Committer: Breezy landing bot
  • Author(s): Martin
  • Date: 2019-06-16 12:44:32 UTC
  • mfrom: (7340.1.1 bp_propose_config_dir)
  • Revision ID: breezy.the.bot@gmail.com-20190616124432-9bwgy8h4e347nz75
Fix use of config_dir in propose plugin.

Merged from https://code.launchpad.net/~gz/brz/bp_propose_config_dir/+merge/368879

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    )
33
33
 
34
34
from ... import (
 
35
    bedding,
35
36
    branch as _mod_branch,
36
37
    controldir,
37
38
    errors,
39
40
    urlutils,
40
41
    version_string as breezy_version,
41
42
    )
42
 
from ...config import AuthenticationConfig, GlobalStack, config_dir
 
43
from ...config import AuthenticationConfig, GlobalStack
43
44
from ...errors import InvalidHttpResponse
44
45
from ...git.urls import git_url_to_bzr_url
45
46
from ...i18n import gettext
55
56
 
56
57
 
57
58
def store_github_token(scheme, host, token):
58
 
    with open(os.path.join(config_dir(), 'github.conf'), 'w') as f:
 
59
    with open(os.path.join(bedding.config_dir(), 'github.conf'), 'w') as f:
59
60
        f.write(token)
60
61
 
61
62
 
62
63
def retrieve_github_token(scheme, host):
63
 
    path = os.path.join(config_dir(), 'github.conf')
 
64
    path = os.path.join(bedding.config_dir(), 'github.conf')
64
65
    if not os.path.exists(path):
65
66
        return None
66
67
    with open(path, 'r') as f: