Skip to content

Commit

Permalink
Merge pull request #3265 from anarkiwi/dpmsg
Browse files Browse the repository at this point in the history
Add DP key to InvalidConfigError exceptions.
  • Loading branch information
anarkiwi authored Oct 1, 2019
2 parents 8d03148 + d395453 commit b665179
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions faucet/config_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,14 @@ def _parse_dp(dp_key, dp_conf, acls_conf, meters_conf, routers_conf, vlans_conf)
def _dp_parser_v2(dps_conf, acls_conf, meters_conf,
routers_conf, vlans_conf, meta_dp_state):

dps = [_parse_dp(dp_key, dp_conf, acls_conf, meters_conf, routers_conf, vlans_conf)
for dp_key, dp_conf in dps_conf.items()]
dps = []
for dp_key, dp_conf in dps_conf.items():
try:
dps.append(_parse_dp(
dp_key, dp_conf, acls_conf, meters_conf, routers_conf, vlans_conf))
except InvalidConfigError as err:
raise InvalidConfigError('DP %s: %s' % (dp_key, err))

for dp in dps:
dp.finalize_config(dps)
for dp in dps:
Expand Down

0 comments on commit b665179

Please sign in to comment.