Commit e0245607 authored by Grizzly's avatar Grizzly

Meilleur gestion d'erreur

parent e1fa7490
......@@ -44,7 +44,7 @@ from django.utils import timezone
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
from macaddress.fields import MACAddressField, default_dialect
from netaddr import mac_bare, EUI, IPSet, IPRange, IPNetwork, IPAddress
from netaddr import mac_bare, EUI, NotRegisteredError, IPSet, IPRange, IPNetwork, IPAddress
import preferences.models
import users.models
......@@ -1051,7 +1051,7 @@ class Interface(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
try:
oui = mac.oui
vendor = oui.registration().org
except:
except NotRegisteredError:
vendor = "Unknown vendor"
return(vendor)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment