summaryrefslogtreecommitdiff
path: root/poezio/plugin.py
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2019-12-28 22:36:27 +0100
committerMaxime Buquet <pep@bouah.net>2019-12-28 22:36:27 +0100
commitfa063ddd5747d63d5b1170bc2883175f41ffad24 (patch)
tree9f9ac4e7b0cdedca45ec24fa5e12981f9d41a78d /poezio/plugin.py
parentd7d4e30eecb0c2ae495be96c42b02109ed7f9ba2 (diff)
parentabbb6a714ef425351c884ae4cc48b7353324e971 (diff)
downloadpoezio-fa063ddd5747d63d5b1170bc2883175f41ffad24.tar.gz
poezio-fa063ddd5747d63d5b1170bc2883175f41ffad24.tar.bz2
poezio-fa063ddd5747d63d5b1170bc2883175f41ffad24.tar.xz
poezio-fa063ddd5747d63d5b1170bc2883175f41ffad24.zip
Merge branch 'plugin-omemo' into 'master'
E2EE plugins support See merge request poezio/poezio!18
Diffstat (limited to 'poezio/plugin.py')
-rw-r--r--poezio/plugin.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/poezio/plugin.py b/poezio/plugin.py
index c3d10b38..61e0ea87 100644
--- a/poezio/plugin.py
+++ b/poezio/plugin.py
@@ -75,9 +75,12 @@ class SafetyMetaclass(type):
@staticmethod
def safe_func(f):
def helper(*args, **kwargs):
+ passthrough = kwargs.pop('passthrough', False)
try:
return f(*args, **kwargs)
except:
+ if passthrough:
+ raise
if inspect.stack()[1][1] == inspect.getfile(f):
raise
elif SafetyMetaclass.core:
@@ -86,9 +89,12 @@ class SafetyMetaclass(type):
'Error')
return None
async def async_helper(*args, **kwargs):
+ passthrough = kwargs.pop('passthrough', False)
try:
return await f(*args, **kwargs)
except:
+ if passthrough:
+ raise
if inspect.stack()[1][1] == inspect.getfile(f):
raise
elif SafetyMetaclass.core: