~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Aaron Bentley
  • Date: 2005-09-29 21:07:17 UTC
  • mfrom: (1393.1.6)
  • mto: (1185.25.1)
  • mto: This revision was merged to the branch mainline in revision 1419.
  • Revision ID: abentley@panoramicfeedback.com-20050929210717-cd73981590f17017
Merged the weave changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        if record.levelno >= logging.WARNING:
59
59
            s += record.levelname + ': '
60
60
            
61
 
        s += record.getMessage() 
 
61
        s += record.getMessage()
 
62
 
 
63
        ##import textwrap
 
64
        ##s = textwrap.fill(s)
62
65
            
63
66
        if record.exc_info:
64
67
            # give just a summary of the exception, not the whole thing
101
104
            return
102
105
        old_fname = trace_fname + '.old'
103
106
 
104
 
        try:
105
 
            # must remove before rename on windows
106
 
            os.remove(old_fname)
107
 
        except OSError:
108
 
            pass
 
107
        from osutils import rename
 
108
        rename(trace_fname, old_fname)
109
109
 
110
 
        try:
111
 
            # might fail if in use on windows
112
 
            os.rename(trace_fname, old_fname)
113
 
        except OSError:
114
 
            pass
115
110
    except OSError:
116
111
        return
117
112