diff options
Diffstat (limited to 'pyfirstaidkit/plugins.py')
-rw-r--r-- | pyfirstaidkit/plugins.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/pyfirstaidkit/plugins.py b/pyfirstaidkit/plugins.py index 0bdd7c3..825038c 100644 --- a/pyfirstaidkit/plugins.py +++ b/pyfirstaidkit/plugins.py @@ -237,11 +237,15 @@ class Plugin(object): Will return (self._state, self._result). The function that was executed and the return value. """ func = self.nextstate() + if func == self.final: raise StopIteration() else: - # Execute the function. - getattr(self, func)() + try: + # Execute the function. + self.call(func) + except: #fallback, when there is some error in plugin + pass return (self._state, self._result) # |