~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-01 19:55:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6460.
  • Revision ID: jelmer@samba.org-20120201195527-p11zolw13w81035y
Consider invalid mail clients an error rather than just a warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
194
194
 
195
195
 
196
196
def _get_bzr_log_filename():
197
 
    bzr_log = osutils.path_from_environ('BZR_LOG')
 
197
    bzr_log = os.environ.get('BZR_LOG')
198
198
    if bzr_log:
199
199
        return bzr_log
200
 
    home = osutils.path_from_environ('BZR_HOME')
 
200
    home = os.environ.get('BZR_HOME')
201
201
    if home is None:
202
 
        # GZ 2012-02-01: Logging to the home dir is bad, but XDG is unclear
203
 
        #                over what would be better. On windows, bug 240550
204
 
        #                suggests LOCALAPPDATA be used instead.
205
 
        home = osutils._get_home_dir()
 
202
        if sys.platform == 'win32':
 
203
            from bzrlib import win32utils
 
204
            home = win32utils.get_home_location()
 
205
        else:
 
206
            home = os.path.expanduser('~')
206
207
    return os.path.join(home, '.bzr.log')
207
208
 
208
209