summaryrefslogtreecommitdiff
path: root/poezio/plugin.py
diff options
context:
space:
mode:
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: