mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-22 23:13:46 +00:00
Meilleur gestion d'erreur
This commit is contained in:
parent
e1fa749039
commit
e024560729
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue