mirror of
https://github.com/netbox-community/Device-Type-Library-Import.git
synced 2024-11-22 07:33:26 +01: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…
Reference in New Issue
Block a user