Code review comment for lp:~nuclearbob/utah/no-virbr0-postinst-fix

Revision history for this message
Javier Collado (javier.collado) wrote :

What about checking the interface before trying to access its data with something like:
if $TAPBR in netifaces.interfaces():
    print netifaces.AF_INET in netifaces.ifaddresses('$TAPBR')
else:
    print False

I don't like much catching exceptions for conditions that can be checked before accessing
some invalid value.

« Back to merge proposal