def print_change_diffs(change_diffs):
 diff_strings = []
 for (file_path, change_diff) in change_diffs.items():
  if (not (change_diff[0] or change_diff[1] or change_diff[2] or change_diff[3])):
   continue
  diff_strings.append(('--- %s' % get_temp_file_path(file_path)))
  diff_strings.append(('+++ %s' % file_path))
  for iter_category in range(4):
   change_category = change_diff[iter_category]
   if ((iter_category == 0) and change_category):
    diff_strings.append('*++ Additional unexpected adds')
   elif ((iter_category == 1) and change_category):
    diff_strings.append('/++ Not present expected adds')
   elif ((iter_category == 2) and change_category):
    diff_strings.append('*-- Additional unexpected removes')
   elif ((iter_category == 3) and change_category):
    diff_strings.append('/-- Not present expected removes')
   for line_change in change_category:
    diff_strings.append(str(line_change).encode('string-escape'))
 return '\n'.join(diff_strings)

def print_change_diffs ( change_diffs ) : diff_strings = [ ] for ( file_path , change_diff ) in change_diffs . items ( ) : if ( not ( change_diff [ 0 ] or change_diff [ 1 ] or change_diff [ 2 ] or change_diff [ 3 ] ) ) : continue diff_strings . append ( ( '--- %s' % get_temp_file_path ( file_path ) ) ) diff_strings . append ( ( '+++ %s' % file_path ) ) for iter_category in range ( 4 ) : change_category = change_diff [ iter_category ] if ( ( iter_category == 0 ) and change_category ) : diff_strings . append ( '*++ Additional unexpected adds' ) elif ( ( iter_category == 1 ) and change_category ) : diff_strings . append ( '/++ Not present expected adds' ) elif ( ( iter_category == 2 ) and change_category ) : diff_strings . append ( '*-- Additional unexpected removes' ) elif ( ( iter_category == 3 ) and change_category ) : diff_strings . append ( '/-- Not present expected removes' ) for line_change in change_category : diff_strings . append ( str ( line_change ) . encode ( 'string-escape' ) ) return '\n' . join ( diff_strings )
pretty prints the output of the evaluate_config_changes function .