~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: mbp at sourcefrog
  • Date: 2005-04-04 13:57:54 UTC
  • Revision ID: mbp@sourcefrog.net-20050404135754-ae2e4e5fb0094c91
- Write .bzr.log in utf8

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
__author__ = "Martin Pool <mbp@canonical.com>"
21
21
 
22
22
 
23
 
import sys, os, time, socket, stat
 
23
import sys, os, time, socket, stat, codecs
24
24
import bzrlib
25
25
 
26
26
######################################################################
87
87
 
88
88
    # XXX: Is HOME always set on Windows?
89
89
    trace_fname = os.path.join(os.environ['HOME'], '.bzr.log')
90
 
    _tracefile = file(trace_fname, 'at')
 
90
    _tracefile = codecs.open(trace_fname, 'at', 'utf8')
91
91
    t = _tracefile
92
92
 
93
93
    if os.fstat(t.fileno())[stat.ST_SIZE] == 0: