Skip to content

Commit

Permalink
[snmp] support profiles with no metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
pducolin committed Nov 16, 2021
1 parent e9853d6 commit 7e75f04
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ def translate_profile(ctx, profile_path, mib_source_url):
data = yaml.safe_load(f.read())

output = []
for metric in data['metrics']:
metrics = data.get('metrics', [])
for metric in metrics:
mib = metric['MIB']
try:
mib_view_controller.mibBuilder.loadModule(mib)
Expand Down

0 comments on commit 7e75f04

Please sign in to comment.