From b4258faa29c820bf860c3f49dc27ece6bb096905 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 26 Feb 2021 22:33:26 +0100 Subject: [PATCH] Fixed broken regular expressions after LINT refactor --- platypush/message/request/__init__.py | 2 +- platypush/procedure/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platypush/message/request/__init__.py b/platypush/message/request/__init__.py index 710e2b429c..6ff30dc35e 100644 --- a/platypush/message/request/__init__.py +++ b/platypush/message/request/__init__.py @@ -129,7 +129,7 @@ class Request(Message): except: if isinstance(v, str): try: - exec('{}="{}"'.format(k, re.sub(r'(^|[^\\\])"', '\1\\"', v))) + exec('{}="{}"'.format(k, re.sub(r'(^|[^\\])"', '\1\\"', v))) except: pass diff --git a/platypush/procedure/__init__.py b/platypush/procedure/__init__.py index 591a922496..31ab570f7e 100644 --- a/platypush/procedure/__init__.py +++ b/platypush/procedure/__init__.py @@ -339,7 +339,7 @@ class WhileProcedure(LoopProcedure): if isinstance(v, str): # noinspection PyBroadException try: - context[k] = eval('"{}"'.format(re.sub(r'(^|[^\\\])"', '\1\\"', v))) + context[k] = eval('"{}"'.format(re.sub(r'(^|[^\\])"', '\1\\"', v))) except: pass @@ -452,7 +452,7 @@ class IfProcedure(Procedure): except: if isinstance(v, str): try: - exec('{}="{}"'.format(k, re.sub(r'(^|[^\\\])"', '\1\\"', v))) + exec('{}="{}"'.format(k, re.sub(r'(^|[^\\])"', '\1\\"', v))) except: pass