fix: exit with 1 when handler mismatches type
This commit is contained in:
parent
dfb239346b
commit
e3a61d3eb6
1 changed files with 4 additions and 0 deletions
|
@ -38,6 +38,10 @@ def main() -> None:
|
|||
handler_name = config.get_handler(zone_name)
|
||||
handler = handlers[handler_name](zone_name, config, args.token)
|
||||
|
||||
if (args.type == 'dns-01') == (handler_name == 'http'):
|
||||
log.error('wrong handler for type, try again')
|
||||
sys.exit(1)
|
||||
|
||||
if args.method == 'begin':
|
||||
handler.create(short_record_name, args.auth)
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue