Skip to content

Commit

Permalink
only call add-api once
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-mangin committed Jul 18, 2022
1 parent 925f493 commit 51f589e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/exabgp/configuration/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,10 @@ def _reload(self):
if not self.tokeniser.set_file(target):
return False

# XXX: Should it be in neighbor ?
self.process.add_api()

if self.parseSection('root') is not True:
# XXX: Should it be in neighbor ?
self.process.add_api()
self._rollback_reload()

return self.error.set(
Expand All @@ -431,7 +432,6 @@ def _reload(self):
"\n%s" % (self.scope.location(), self.tokeniser.number, ' '.join(self.tokeniser.line), str(self.error))
)

self.process.add_api()
self._commit_reload()
self._link()

Expand Down

0 comments on commit 51f589e

Please sign in to comment.