Fix incorrect exception message

pull/3393/head
David Núñez 2024-01-17 12:51:44 +01:00
parent 70d7fe1319
commit dedf747fe2
No known key found for this signature in database
GPG Key ID: 53A9D83EF4C6332A
1 changed files with 3 additions and 1 deletions

View File

@ -662,7 +662,9 @@ class Learner:
self.log.info(f"Learned about enough nodes after {rounds_undertaken} rounds.")
return True
if not self._learning_task.running:
raise RuntimeError("Learning loop is not running. Start it with start_learning().")
raise RuntimeError(
"Learning loop is not running. Start it with start_learning_loop()."
)
elif not reactor.running and not learn_on_this_thread:
raise RuntimeError(
f"The reactor isn't running, but you're trying to use it for discovery. You need to start the Reactor in order to use {self} this way.")