diff --git a/buildtrigger/bitbuckethandler.py b/buildtrigger/bitbuckethandler.py index 8dbd03329..669702b79 100644 --- a/buildtrigger/bitbuckethandler.py +++ b/buildtrigger/bitbuckethandler.py @@ -265,7 +265,7 @@ class BitbucketBuildTrigger(BuildTriggerHandler): trigger_uuid = self.trigger.uuid callback_url = '%s/oauth1/bitbucket/callback/trigger/%s' % (get_app_url(), trigger_uuid) - return BitBucket(key, secret, callback_url) + return BitBucket(key, secret, callback_url, timeout=5) def _get_authorized_client(self): """ Returns an authorized API client. """ diff --git a/buildtrigger/githubhandler.py b/buildtrigger/githubhandler.py index d60c802fb..1a74e5c2f 100644 --- a/buildtrigger/githubhandler.py +++ b/buildtrigger/githubhandler.py @@ -145,7 +145,8 @@ class GithubBuildTrigger(BuildTriggerHandler): return Github(self.auth_token, base_url=github_trigger.api_endpoint(), client_id=github_trigger.client_id(), - client_secret=github_trigger.client_secret()) + client_secret=github_trigger.client_secret(), + timeout=5) @classmethod def service_name(cls):