def wait_until_no_listen_pids_namespace(namespace, timeout=SIGTERM_WAITTIME):
 start = end = time.time()
 while ((end - start) < timeout):
  if (not find_listen_pids_namespace(namespace)):
   return
  time.sleep(1)
  end = time.time()
 raise PidsInNamespaceException

def wait_until_no_listen_pids_namespace ( namespace , timeout = SIGTERM_WAITTIME ) : start = end = time . time ( ) while ( ( end - start ) < timeout ) : if ( not find_listen_pids_namespace ( namespace ) ) : return time . sleep ( 1 ) end = time . time ( ) raise PidsInNamespaceException
poll listening processes within the given namespace .