summaryrefslogtreecommitdiff
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
parent9744475a9d100a1267ebe0be87acce8895cf3c57 (diff)
downloadgitlab-167252924823badfa82b5287c940c5925fb05a9e.tar.gz
CLI: support a timout option
-rw-r--r--AUTHORS1
-rwxr-xr-xgitlab12
2 files changed, 12 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 058febb..6553ec6 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -14,3 +14,4 @@ Koen Smets <koen.smets@gmail.com>
Mart Sõmermaa <mart.somermaa@cgi.com>
Diego Giovane Pasqualin <dpasqualin@c3sl.ufpr.br>
Crestez Dan Leonard <lcrestez@ixiacom.com>
+Patrick Miller <patrick@velocitywebworks.com>
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: