knotctl 0.1.3__tar.gz → 0.1.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: knotctl
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: A CLI for knotapi.
5
5
  Author-email: Micke Nordin <hej@mic.ke>
6
6
  Requires-Python: >=3.9
@@ -16,7 +16,7 @@ classifiers=[
16
16
  "Operating System :: OS Independent",
17
17
  ]
18
18
  requires-python= ">=3.9"
19
- version = "0.1.3"
19
+ version = "0.1.5"
20
20
 
21
21
  dependencies = [
22
22
  "argcomplete==2.0.0",
@@ -40,7 +40,7 @@ include = ["LICENSE", "README.md"]
40
40
  [tool.briefcase]
41
41
  project_name = "knotctl"
42
42
  bundle = "org.smolnet"
43
- version = "0.1.3"
43
+ version = "0.1.5"
44
44
 
45
45
  [tool.briefcase.app.knotctl]
46
46
  formal_name = "knotctl"
@@ -163,7 +163,7 @@ def main() -> int:
163
163
  user = config["username"]
164
164
  if "ttl" in args:
165
165
  ttl = args.ttl
166
- if "data" in args:
166
+ if "data" in args and args.data is not None:
167
167
  quotedata = quote(args.data, safe="")
168
168
  if args.command != "update":
169
169
  args.argument = None
@@ -172,9 +172,14 @@ def main() -> int:
172
172
  zname = args.zone
173
173
  else:
174
174
  zname = args.zone + "."
175
- soa_url = setup_url(baseurl, None, None, zname, "SOA", None, args.zone)
176
- soa_json = knotctl.runner.lister(soa_url, True, ret=True)
177
- ttl = soa_json[0]["ttl"]
175
+ try:
176
+ soa_url = setup_url(baseurl, None, None, zname, "SOA", None, args.zone)
177
+ soa_json = knotctl.runner.lister(soa_url, True, ret=True)
178
+ ttl = soa_json[0]["ttl"]
179
+ except requests.exceptions.RequestException as e:
180
+ output(error(e, "No permissions, or zone doesn't exist"))
181
+ return 0
182
+
178
183
  if args.command == "user":
179
184
  if args.username:
180
185
  user = args.username
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes