From 0bf6bf32f532cb6a23eeeb49516cb436a7cfa08c Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 16 Sep 2020 02:22:15 +0200 Subject: [PATCH] Fix more optional dependencies --- royalnet/serf/serf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/royalnet/serf/serf.py b/royalnet/serf/serf.py index 8aa075ae..89e8d1aa 100644 --- a/royalnet/serf/serf.py +++ b/royalnet/serf/serf.py @@ -314,7 +314,8 @@ class Serf(abc.ABC): async def run(self): """A coroutine that starts the event loop and handles command calls.""" - self.herald_task = self.tasks.add(self.herald.run()) + if self.herald is not None: + self.herald_task = self.tasks.add(self.herald.run()) # OVERRIDE THIS METHOD! @classmethod