Handle ValueError exception that can be thrown by inet_pton in windows