From 2cd47470dede8c2c0e5c9befbfb01fd5a7cee7f7 Mon Sep 17 00:00:00 2001 From: Ruben van de Ven Date: Mon, 26 Aug 2019 08:12:22 +0200 Subject: [PATCH] Allow 'inversematch' on last fix --- hugvey/story.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hugvey/story.py b/hugvey/story.py index c605c3a..0912782 100644 --- a/hugvey/story.py +++ b/hugvey/story.py @@ -467,10 +467,12 @@ class Condition(object): msg = story.get(self.vars['msgId']) if not msg: story.logger.critical(f"Condition on non-existing message: {self.vars['msgId']}") - return False + # assigning false to r, keeps 'inverseMatch' working, even when msgId is wrong + r = False + else: + #: :type msg: Message + r = msg.isFinished() - #: :type msg: Message - r = msg.isFinished() if r: story.logger.debug(f"Msg {self.vars['msgId']} has been played.")