mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-11-25 22:22:26 +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.functional import cached_property
|
||||||
from django.utils.translation import ugettext_lazy as _
|
from django.utils.translation import ugettext_lazy as _
|
||||||
from macaddress.fields import MACAddressField, default_dialect
|
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 preferences.models
|
||||||
import users.models
|
import users.models
|
||||||
|
@ -1051,7 +1051,7 @@ class Interface(RevMixin, AclMixin, FieldPermissionModelMixin, models.Model):
|
||||||
try:
|
try:
|
||||||
oui = mac.oui
|
oui = mac.oui
|
||||||
vendor = oui.registration().org
|
vendor = oui.registration().org
|
||||||
except:
|
except NotRegisteredError:
|
||||||
vendor = "Unknown vendor"
|
vendor = "Unknown vendor"
|
||||||
return(vendor)
|
return(vendor)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue