Skip to content

Commit

Permalink
better report issue when parsing command
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mangin committed Mar 29, 2023
1 parent ff4ad89 commit ad4f72f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/exabgp/configuration/static/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ def attributes(tokeniser):
rd = route_distinguisher(tokeniser)
continue

action = ParseStatic.action[command]
action = ParseStatic.action.get(command, '')
if action == '':
raise ValueError(f"The command '{command}' is not known or valid where used")

if action == 'attribute-add':
attr.add(ParseStatic.known[command](tokeniser))
Expand Down

0 comments on commit ad4f72f

Please sign in to comment.