comparison mercurial/util.py @ 28496:b592564a803c

util: reword debugstacktrace comment
author timeless <timeless@mozdev.org>
date Fri, 11 Mar 2016 16:50:14 +0000
parents 14033c5dd261
children 906fece80cfa
comparison
equal deleted inserted replaced
28495:70c2f8a98276 28496:b592564a803c
2551 return results 2551 return results
2552 2552
2553 def debugstacktrace(msg='stacktrace', skip=0, f=sys.stderr, otherf=sys.stdout): 2553 def debugstacktrace(msg='stacktrace', skip=0, f=sys.stderr, otherf=sys.stdout):
2554 '''Writes a message to f (stderr) with a nicely formatted stacktrace. 2554 '''Writes a message to f (stderr) with a nicely formatted stacktrace.
2555 Skips the 'skip' last entries. By default it will flush stdout first. 2555 Skips the 'skip' last entries. By default it will flush stdout first.
2556 It can be used everywhere and do intentionally not require an ui object. 2556 It can be used everywhere and intentionally does not require an ui object.
2557 Not be used in production code but very convenient while developing. 2557 Not be used in production code but very convenient while developing.
2558 ''' 2558 '''
2559 if otherf: 2559 if otherf:
2560 otherf.flush() 2560 otherf.flush()
2561 f.write('%s at:\n' % msg) 2561 f.write('%s at:\n' % msg)