def __clean_tmp(sfn):
 if sfn.startswith(os.path.join(tempfile.gettempdir(), salt.utils.files.TEMPFILE_PREFIX)):
  all_roots = itertools.chain.from_iterable(six.itervalues(__opts__['file_roots']))
  in_roots = any((sfn.startswith(root) for root in all_roots))
  if (os.path.exists(sfn) and (not in_roots)):
   os.remove(sfn)

def __clean_tmp ( sfn ) : if sfn . startswith ( os . path . join ( tempfile . gettempdir ( ) , salt . utils . files . TEMPFILE_PREFIX ) ) : all_roots = itertools . chain . from_iterable ( six . itervalues ( __opts__ [ 'file_roots' ] ) ) in_roots = any ( ( sfn . startswith ( root ) for root in all_roots ) ) if ( os . path . exists ( sfn ) and ( not in_roots ) ) : os . remove ( sfn )
clean out a template temp file .