Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
651477787 authored May 5, 2023
1 parent 9dd32cc commit 3669cea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6513,7 +6513,8 @@ def enable(ctx, ifname):
config_db = ValidatedConfigDBConnector(ctx.obj['db'])
if ADHOC_VALIDATION:
if not interface_name_is_valid(config_db, ifname) and ifname != 'all':
ctx.fail("Invalid interface name")
click.echo("Invalid interface name")
return

intf_dict = config_db.get_table('SFLOW_SESSION')

Expand All @@ -6539,7 +6540,8 @@ def disable(ctx, ifname):
config_db = ValidatedConfigDBConnector(ctx.obj['db'])
if ADHOC_VALIDATION:
if not interface_name_is_valid(config_db, ifname) and ifname != 'all':
ctx.fail("Invalid interface name")
click.echo("Invalid interface name")
return

intf_dict = config_db.get_table('SFLOW_SESSION')

Expand Down

0 comments on commit 3669cea

Please sign in to comment.