Skip to content

Commit

Permalink
Merge pull request #257 from meejah/missing-last-router
Browse files Browse the repository at this point in the history
Send .done() input to Microdescriptor parser
  • Loading branch information
meejah committed Nov 4, 2017
2 parents 46c0c39 + 6bd4090 commit c294eb6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ unreleased
* add method :func:`txtorcon.Tor.is_ready`
* add method :func:`txtorcon.Tor.become_ready`
* fix handling of certain defaults (`*PortLines` and friends)
* fix last router (usually) missing with (new) `MicroDescriptorParser`


v0.19.3
Expand Down
5 changes: 3 additions & 2 deletions test/test_torstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,9 @@ def confirm_state(self, x):
return x

def confirm_consensus(self, x):
self.assertEqual(1, len(x.all_routers))
self.assertEqual('fake', list(x.routers.values())[0].name)
self.assertEqual(2, len(x.all_routers))
self.assertIn('fake', x.routers)
self.assertIn('ekaf', x.routers)
return x

def test_build(self):
Expand Down
1 change: 1 addition & 0 deletions txtorcon/torstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ def _bootstrap(self, arg=None):
'ns/all',
self._network_status_parser.feed_line,
)
self._network_status_parser.done()

# update list of existing circuits
cs = yield self.protocol.get_info_raw('circuit-status')
Expand Down

0 comments on commit c294eb6

Please sign in to comment.