Removes test on device_platform
This commit is contained in:
parent
93b540f643
commit
984c4c2e23
1 changed files with 11 additions and 14 deletions
|
|
@ -29,7 +29,6 @@ def get_device_type(type):
|
|||
|
||||
|
||||
def get_device_platform(device_platform):
|
||||
if device_platform is None:
|
||||
try:
|
||||
# Python 3.8+ moved linux_distribution() to distro
|
||||
try:
|
||||
|
|
@ -43,8 +42,6 @@ def get_device_platform(device_platform):
|
|||
return None
|
||||
except (ModuleNotFoundError, NameError, AttributeError):
|
||||
return None
|
||||
else:
|
||||
linux_distribution = device_platform
|
||||
|
||||
device_platform = nb.dcim.platforms.get(name=linux_distribution)
|
||||
if device_platform is None:
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue