From 7137c49ec5dd2ed7f17b28dead6899afcb215368 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 23 Apr 2015 10:35:12 +0200 Subject: [PATCH] [FIX] runbot: skip github API calls if repo has no token, instead of crashing/logging an exception Avoids spurious errors for the github status updates --- runbot/runbot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runbot/runbot.py b/runbot/runbot.py index 90d25c18..5533fa3f 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -225,6 +225,8 @@ class runbot_repo(osv.osv): def github(self, cr, uid, ids, url, payload=None, ignore_errors=False, context=None): """Return a http request to be sent to github""" for repo in self.browse(cr, uid, ids, context=context): + if not repo.token: + return try: match_object = re.search('([^/]+)/([^/]+)/([^/.]+(.git)?)', repo.base) if match_object: