Remove nargs=* to flatten list
This commit is contained in:
parent
1c04ebcc18
commit
41c5efa97e
1 changed files with 2 additions and 2 deletions
|
@ -419,7 +419,6 @@ def main() -> int:
|
||||||
updatecmd.add_argument(
|
updatecmd.add_argument(
|
||||||
"-a",
|
"-a",
|
||||||
"--argument",
|
"--argument",
|
||||||
nargs="*",
|
|
||||||
action="append",
|
action="append",
|
||||||
metavar="KEY=VALUE",
|
metavar="KEY=VALUE",
|
||||||
help="Specify key - value pairs to be updated: name=dns1.example.com. or data=127.0.0.1 for example. --argument can be repeated",
|
help="Specify key - value pairs to be updated: name=dns1.example.com. or data=127.0.0.1 for example. --argument can be repeated",
|
||||||
|
@ -473,6 +472,7 @@ def main() -> int:
|
||||||
headers = {"Authorization": "Bearer {}".format(token)}
|
headers = {"Authorization": "Bearer {}".format(token)}
|
||||||
|
|
||||||
# Route based on command
|
# Route based on command
|
||||||
|
url = ""
|
||||||
ttl = None
|
ttl = None
|
||||||
if "ttl" in args:
|
if "ttl" in args:
|
||||||
ttl = args.ttl
|
ttl = args.ttl
|
||||||
|
@ -520,7 +520,7 @@ def main() -> int:
|
||||||
run_log(url, args.json, headers)
|
run_log(url, args.json, headers)
|
||||||
else:
|
else:
|
||||||
parser.print_help(sys.stderr)
|
parser.print_help(sys.stderr)
|
||||||
return 1
|
return 2
|
||||||
except requests.exceptions.RequestException as e:
|
except requests.exceptions.RequestException as e:
|
||||||
output(error(e, "Could not connect to server"))
|
output(error(e, "Could not connect to server"))
|
||||||
except (RequestsJSONDecodeError, SimplejsonJSONDecodeError):
|
except (RequestsJSONDecodeError, SimplejsonJSONDecodeError):
|
||||||
|
|
Loading…
Add table
Reference in a new issue