~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/trace.py

  • Committer: Robert Collins
  • Date: 2005-09-27 07:24:40 UTC
  • mfrom: (1185.1.41)
  • Revision ID: robertc@robertcollins.net-20050927072440-1bf4d99c3e1db5b3
pair programming worx... merge integration and weave

Show diffs side-by-side

added added

removed removed

Lines of Context:
104
104
            return
105
105
        old_fname = trace_fname + '.old'
106
106
 
107
 
        try:
108
 
            # must remove before rename on windows
109
 
            os.remove(old_fname)
110
 
        except OSError:
111
 
            pass
 
107
        from osutils import rename
 
108
        rename(trace_fname, old_fname)
112
109
 
113
 
        try:
114
 
            # might fail if in use on windows
115
 
            os.rename(trace_fname, old_fname)
116
 
        except OSError:
117
 
            pass
118
110
    except OSError:
119
111
        return
120
112
 
200
192
    logging.getLogger('').addHandler(_stderr_handler)
201
193
 
202
194
 
203
 
 
204
195
def disable_default_logging():
205
196
    """Turn off default log handlers.
206
197