Skip to content

Commit 1672529

Browse files
author
Gauvain Pocentek
committed
CLI: support a timout option
1 parent 9744475 commit 1672529

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

AUTHORS

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Koen Smets <koen.smets@gmail.com>
1414
Mart Sõmermaa <mart.somermaa@cgi.com>
1515
Diego Giovane Pasqualin <dpasqualin@c3sl.ufpr.br>
1616
Crestez Dan Leonard <lcrestez@ixiacom.com>
17+
Patrick Miller <patrick@velocitywebworks.com>

gitlab

+11-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def usage():
141141
def do_auth():
142142
try:
143143
gl = gitlab.Gitlab(gitlab_url, private_token=gitlab_token,
144-
ssl_verify=ssl_verify)
144+
ssl_verify=ssl_verify, timeout=timeout)
145145
gl.auth()
146146
except:
147147
die("Could not connect to GitLab (%s)" % gitlab_url)
@@ -247,6 +247,7 @@ def do_project_owned():
247247

248248

249249
ssl_verify = True
250+
timeout = 60
250251
gitlab_id = None
251252
verbose = False
252253

@@ -325,6 +326,15 @@ try:
325326
except:
326327
pass
327328

329+
try:
330+
timeout = config.getboolean('global', 'timeout')
331+
except:
332+
pass
333+
try:
334+
timeout = config.getboolean(gitlab_id, 'timeout')
335+
except:
336+
pass
337+
328338
try:
329339
what = args.pop(0)
330340
action = args.pop(0)

0 commit comments

Comments
 (0)