« Previous | Next » 

Revision e7b3ad26


Added by Manuel Franceschini almost 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 <>


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences