Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning for snmp generate profile command #9967

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
use abort
  • Loading branch information
AlexandreYang committed Aug 26, 2021
commit 288e26345f9bfcc78c308c32a1a303715741f615
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import click
import yaml

from ...console import CONTEXT_SETTINGS, echo_debug, echo_info, echo_warning, set_debug
from ...console import CONTEXT_SETTINGS, abort, echo_debug, echo_info, set_debug


@click.command(context_settings=CONTEXT_SETTINGS, short_help='Generate an SNMP profile from a collection of MIB files')
Expand Down Expand Up @@ -110,8 +110,7 @@ def generate_profile_from_mibs(ctx, mib_files, filters, aliases, debug, interact

# ensure at least one mib file is provided
if len(mib_files) == 0:
echo_warning('🙄 no mib file provided, need at least one mib file to generate a profile')
return
abort('🙄 no mib file provided, need at least one mib file to generate a profile')

# create a list of all mib files directories and mib names
source_directories = set()
Expand Down