def _binary_replace(old, new):
 old_isbin = (not salt.utils.istextfile(old))
 new_isbin = (not salt.utils.istextfile(new))
 if any((old_isbin, new_isbin)):
  if all((old_isbin, new_isbin)):
   return 'Replace binary file'
  elif old_isbin:
   return 'Replace binary file with text file'
  elif new_isbin:
   return 'Replace text file with binary file'
 return ''

def _binary_replace ( old , new ) : old_isbin = ( not salt . utils . istextfile ( old ) ) new_isbin = ( not salt . utils . istextfile ( new ) ) if any ( ( old_isbin , new_isbin ) ) : if all ( ( old_isbin , new_isbin ) ) : return 'Replace binary file' elif old_isbin : return 'Replace binary file with text file' elif new_isbin : return 'Replace text file with binary file' return ''
this function does not do any diffing .