summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/plugins/Plugin.py16
-rw-r--r--module/plugins/PluginManager.py2
2 files changed, 12 insertions, 6 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index d21bbb196..d1227eb29 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -351,7 +351,9 @@ class Plugin(Base):
def abort(self, reason=""):
""" abort and give reason """
- raise Abort
+ if reason:
+ self.pyfile.error = str(reason)
+ raise Abort #@TODO: Use raise Abort(reason) in 0.4.10
def error(self, reason="", type=""):
@@ -365,14 +367,18 @@ class Plugin(Base):
raise Fail(msg)
- def offline(self):
+ def offline(self, reason=""):
""" fail and indicate file is offline """
- raise Fail("offline")
+ if reason:
+ self.pyfile.error = str(reason)
+ raise Fail("offline") #@TODO: Use raise Fail("offline", reason) in 0.4.10
- def tempOffline(self):
+ def tempOffline(self, reason=""):
""" fail and indicates file ist temporary offline, the core may take consequences """
- raise Fail("temp. offline")
+ if reason:
+ self.pyfile.error = str(reason)
+ raise Fail("temp. offline") #@TODO: Use raise Fail("temp. offline", reason) in 0.4.10
def retry(self, max_tries=5, wait_time=1, reason=""):
diff --git a/module/plugins/PluginManager.py b/module/plugins/PluginManager.py
index df22b69e7..78b5a9337 100644
--- a/module/plugins/PluginManager.py
+++ b/module/plugins/PluginManager.py
@@ -43,7 +43,7 @@ class PluginManager:
sys.path.append(abspath(""))
- #@NOTE: In 0.4.10 directory "accounts" changes to "account" and "hooks" changes to "hook"
+ #@NOTE: In 0.4.10 directory "accounts" changes to "account" and "hooks" changes to "addon"
self.plugins['accounts'] = self.accountPlugins = self.parse("accounts")
self.plugins['hooks'] = self.hookPlugins = self.parse("hooks")