def extract_config_changes(file_paths, compared_file_paths=[]):
 changes = {}
 for i in range(len(file_paths)):
  temp_file_path = get_temp_file_path(file_paths[i])
  if (len(compared_file_paths) > i):
   command = ((('diff -U 0 -b ' + compared_file_paths[i]) + ' ') + file_paths[i])
  else:
   command = ((('diff -U 0 -b ' + temp_file_path) + ' ') + file_paths[i])
  (_, output) = commands.getstatusoutput(command)
  lines = output.split('\n')
  changes[file_paths[i]] = parse_unified_diff_output(lines)
 return changes

def extract_config_changes ( file_paths , compared_file_paths = [ ] ) : changes = { } for i in range ( len ( file_paths ) ) : temp_file_path = get_temp_file_path ( file_paths [ i ] ) if ( len ( compared_file_paths ) > i ) : command = ( ( ( 'diff -U 0 -b ' + compared_file_paths [ i ] ) + ' ' ) + file_paths [ i ] ) else : command = ( ( ( 'diff -U 0 -b ' + temp_file_path ) + ' ' ) + file_paths [ i ] ) ( _ , output ) = commands . getstatusoutput ( command ) lines = output . split ( '\n' ) changes [ file_paths [ i ] ] = parse_unified_diff_output ( lines ) return changes
extracts diff information based on the new and temporarily saved old config files returns a dictionary of file path and corresponding diff information key-value pairs .