mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2025-06-10 20:07:18 +02:00
Return empty deviceTypes in readYAML on error
instead of continuing with uninitilized data
This commit is contained in:
parent
54907aaffb
commit
2188ac7a62
@ -48,6 +48,7 @@ def readYAMl(files):
|
||||
data = yaml.safe_load(stream)
|
||||
except yaml.YAMLError as exc:
|
||||
print(exc)
|
||||
return deviceTypes
|
||||
manufacturer = data['manufacturer']
|
||||
data['manufacturer'] = {}
|
||||
data['manufacturer']['name'] = manufacturer
|
||||
|
Loading…
x
Reference in New Issue
Block a user