8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

Meilleur gestion d'erreur

This commit is contained in:
Grizzly 2019-01-27 10:38:43 +00:00
parent e1fa749039
commit e024560729

View file

@ -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)