mirror of
https://platform.sunet.se/SUNET/knotctl.git
synced 2025-07-13 06:38:27 +02:00
Compare commits
No commits in common. "3fff6469455bff1d4e35d4810eebb1edbbf9800d" and "1c04ebcc18e80ac4fcab0abfb4ca8f2037c6e750" have entirely different histories.
3fff646945
...
1c04ebcc18
2 changed files with 3 additions and 3 deletions
|
@ -419,6 +419,7 @@ 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",
|
||||||
|
@ -472,7 +473,6 @@ 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 2
|
return 1
|
||||||
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):
|
||||||
|
|
|
@ -16,7 +16,7 @@ classifiers=[
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
]
|
]
|
||||||
requires-python= ">=3.9"
|
requires-python= ">=3.9"
|
||||||
version = "0.1.0"
|
version = "0.0.9"
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"argcomplete==2.0.0",
|
"argcomplete==2.0.0",
|
||||||
|
|
Loading…
Add table
Reference in a new issue