From f4ddbfb92a24a817b5f8f1b698ff5d18245152ad Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jan 03 2018 08:48:38 +0000 Subject: Catch the TypeError raised when running tasks in the tests Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/lib/tasks.py b/pagure/lib/tasks.py index 11d1333..1382319 100644 --- a/pagure/lib/tasks.py +++ b/pagure/lib/tasks.py @@ -59,7 +59,10 @@ def set_status(function): def decorated_function(self, *args, **kwargs): """ Decorated function, actually does the work. """ if self is not None: - self.update_state(state='RUNNING') + try: + self.update_state(state='RUNNING') + except TypeError: + pass return function(self, *args, **kwargs) return decorated_function