Show help when run without arguments

main v0.0.3
Micke Nordin 2 years ago
parent df82367e7b
commit 5baba47b9c
Signed by untrusted user: micke
GPG Key ID: 0DA0A7A5708FE257

@ -259,8 +259,13 @@ def main() -> int:
ttl = None
if 'ttl' in args:
ttl = args.ttl
url = setup_url(baseurl, args.argument, args.data, args.name, args.rtype,
ttl, args.zone)
try:
url = setup_url(baseurl, args.argument, args.data, args.name,
args.rtype, ttl, args.zone)
except AttributeError:
parser.print_help(sys.stderr)
sys.exit(1)
try:
if args.command == "add":
run_add(url, args.json, headers)

@ -5,7 +5,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
setuptools.setup(
name="knotctl",
version="0.0.2",
version="0.0.3",
packages = setuptools.find_packages(),
author="Micke Nordin",
author_email="hej@mic.ke",

Loading…
Cancel
Save