~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/config.py

  • Committer: Robert Collins
  • Date: 2005-10-11 07:21:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1443.
  • Revision ID: robertc@robertcollins.net-20051011072100-16996b55c43ff24f
move editor into the config file too

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    return parser
50
50
 
51
51
 
 
52
def get_editor(parser=None):
 
53
    if parser is None:
 
54
        parser = _get_config_parser()
 
55
    if parser.has_option('DEFAULT', 'editor'):
 
56
        return parser.get('DEFAULT', 'editor')
 
57
 
 
58
 
52
59
def _get_user_id(branch=None, parser = None):
53
60
    """Return the full user id from a file or environment variable.
54
61
 
80
87
        except BzrError, e:
81
88
            pass
82
89
    
83
 
    if not parser:
 
90
    if parser is None:
84
91
        parser = _get_config_parser()
85
92
    if parser.has_option('DEFAULT', 'email'):
86
93
        email = parser.get('DEFAULT', 'email')