def __clean_tmp_dirs():
 pid = os.getpid()
 if (pid not in __tmp_dirs):
  return
 for dir in __tmp_dirs[pid]:
  try:
   shutil.rmtree(dir)
  except OSError as e:
   if (e.errno == 2):
    pass
 __tmp_dirs[pid] = []

def __clean_tmp_dirs ( ) : pid = os . getpid ( ) if ( pid not in __tmp_dirs ) : return for dir in __tmp_dirs [ pid ] : try : shutil . rmtree ( dir ) except OSError as e : if ( e . errno == 2 ) : pass __tmp_dirs [ pid ] = [ ]
erase temporary directories that were created by the get_tmp_dir() function and that are still present .