~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/request.py

  • Committer: John Arbash Meinel
  • Date: 2009-12-18 22:14:18 UTC
  • mto: This revision was merged to the branch mainline in revision 4912.
  • Revision ID: john@arbash-meinel.com-20091218221418-z5z2sgq6shohraw1
It seems that python 2.4/2.5 don't have thread.ident, fall back to getName()

Show diffs side-by-side

added added

removed removed

Lines of Context:
291
291
        self._command = None
292
292
        if 'hpss' in debug.debug_flags:
293
293
            self._request_start_time = osutils.timer_func()
294
 
            self._thread_id = threading.currentThread().ident
 
294
            cur_thread = threading.currentThread()
 
295
            self._thread_id = getattr(cur_thread, 'ident', None)
 
296
            if self._thread_id is None:
 
297
                self._thread_id = cur_thread.getName()
295
298
 
296
299
    def _trace(self, action, message, extra_bytes=None, include_time=False):
297
300
        # It is a bit of a shame that this functionality overlaps with that of