Added a short timeout for test requests

This commit is contained in:
Jakub Roztocil committed 2016-03-02 00:31:00 +08:00
1 parent 20f01709ea
commit d4067fcb6d
2 files changed
+12 -5

No files matched your search

+7 -2
View File
@@ -185,8 +185,13 @@ def http(*args, **kwargs):
stderr = env.stderr
args = list(args)
if '--debug' not in args and '--traceback' not in args:
args = ['--traceback'] + args
extra_args = []
if '--debug' not in args:
if '--traceback' not in args:
extra_args.append('--traceback')
if '--timeout' not in ' '.join(args):
extra_args.append('--timeout=3')
args = extra_args + args
def dump_stderr():
stderr.seek(0)