def safe_close(fd):
 try:
  os.close(fd)
 except Exception:
  LOGGER.exception('Error while closing FD')

def safe_close ( fd ) : try : os . close ( fd ) except Exception : LOGGER . exception ( 'Error while closing FD' )
close a file descriptor .