Skip to content

Commit

Permalink
Make error message more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
jplitza committed Sep 27, 2019
1 parent 10053ce commit ecf259a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions birdagent.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,9 @@ def getBGPState(self):
else:
state["bgp-peers"][bgp_proto][peerprop_name] = int(
match.group(1))
except:
print("WARNING: Unable to process \"%s\" as \"%s\" for protocol \"%s\"" %
(match.group(1), peerprop_name, bgp_proto))
except Exception as e:
print("WARNING: Unable to process \"%s\" as \"%s\" for protocol \"%s\": %s" %
(match.group(1), peerprop_name, bgp_proto, str(e)))

if self._re_birdcli_bgp_end.search(line):
bgp_proto = None
Expand Down

0 comments on commit ecf259a

Please sign in to comment.