def _makepretty(printout, stack):
 printout.write('======== Salt Debug Stack Trace =========\n')
 traceback.print_stack(stack, file=printout)
 printout.write('=========================================\n')

def _makepretty ( printout , stack ) : printout . write ( '======== Salt Debug Stack Trace =========\n' ) traceback . print_stack ( stack , file = printout ) printout . write ( '=========================================\n' )
pretty print the stack trace and environment information for debugging those hard to reproduce user problems .