mirror of
https://github.com/httpie/cli.git
synced 2026-06-20 11:32:56 +02:00
Added a short timeout for test requests
This commit is contained in:
1 parent
20f01709ea
commit
d4067fcb6d
2 files changed
+12
-5
No files matched your search
+7
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user