summaryrefslogtreecommitdiff
path: root/gitlab
diff options
context:
space:
mode:
authorGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2014-10-26 06:43:37 +0100
committerGauvain Pocentek <gauvain.pocentek@objectif-libre.com>2014-10-26 06:43:37 +0100
commit167252924823badfa82b5287c940c5925fb05a9e (patch)
tree540992cefdbb5d82d4b697855154ea7f84a0c6b0 /gitlab
parent9744475a9d100a1267ebe0be87acce8895cf3c57 (diff)
downloadgitlab-167252924823badfa82b5287c940c5925fb05a9e.tar.gz
CLI: support a timout option
Diffstat (limited to 'gitlab')
-rwxr-xr-xgitlab12
1 files changed, 11 insertions, 1 deletions
diff --git a/gitlab b/gitlab
index f0aa460..4332995 100755
--- a/gitlab
+++ b/gitlab
@@ -141,7 +141,7 @@ def usage():
def do_auth():
try:
gl = gitlab.Gitlab(gitlab_url, private_token=gitlab_token,
- ssl_verify=ssl_verify)
+ ssl_verify=ssl_verify, timeout=timeout)
gl.auth()
except:
die("Could not connect to GitLab (%s)" % gitlab_url)
@@ -247,6 +247,7 @@ def do_project_owned():
ssl_verify = True
+timeout = 60
gitlab_id = None
verbose = False
@@ -326,6 +327,15 @@ except:
pass
try:
+ timeout = config.getboolean('global', 'timeout')
+except:
+ pass
+try:
+ timeout = config.getboolean(gitlab_id, 'timeout')
+except:
+ pass
+
+try:
what = args.pop(0)
action = args.pop(0)
except: