From 7261f5f4794f02f031448e1b158d8ed1b29e90af Mon Sep 17 00:00:00 2001 From: Gery Debongnie Date: Tue, 15 Jul 2014 14:38:36 +0200 Subject: [PATCH] [IMP] throw exception when no toke is available --- runbot/runbot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runbot/runbot.py b/runbot/runbot.py index 10bc6188..b565d68e 100644 --- a/runbot/runbot.py +++ b/runbot/runbot.py @@ -193,6 +193,8 @@ class runbot_repo(osv.osv): def github(self, cr, uid, ids, url, payload=None, delete=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: + raise Exception('Repository does not have a token to authenticate') match_object = re.search('([^/]+)/([^/]+)/([^/]+)', repo.base) if match_object: url = url.replace(':owner', match_object.group(2))