« Previous | Next » 

Revision e7b3ad26

IDe7b3ad263786d91ae1e5e447bd9af8fdcebb607a

Added by Manuel Franceschini over 13 years ago

netutils: make re class attribute and catch IndexError

These missing changes were initially agreed upon but then forgotten.
First, we move the valid name regex to the class-level such that it
won't be compiled for every invocation of GetIP() and we wrap the result
of getaddrinfo() into a try/except to catch a possible IndexError.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences