When an empty string (curl_command = '') is passed to uncurl.parse_context(curl_command) a python script ends abnormally showing this error:
usage: [-h] [-d DATA] [-b DATA_BINARY] [-X X] [-H HEADER] [--compressed] [-k] [--user USER] [-i] [-s] command url
: error: the following arguments are required: command, url
The abnormal termination could be fixed with something like
try:
parsed_args = parser.parse_args(tokens)
except:
pass
in
|
parsed_args = parser.parse_args(tokens) |