Gandi / gandi.cli

⚠ ARCHIVED - Command line interface to Gandi.net products using the public API
http://cli.gandi.net/
GNU General Public License v3.0
347 stars 62 forks source link

Unable to add a new record #280

Closed dud225 closed 5 years ago

dud225 commented 5 years ago

Hello

adding a new record is currently broken :

Python v2 :

# gandi dns create FQDN TXT "TXT record"
Traceback (most recent call last):
  File "/usr/local/bin/gandi", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/gandi/cli/__main__.py", line 8, in main
    cli(obj={})
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/gandi/cli/core/cli.py", line 163, in invoke
    click.Group.invoke(self, ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1135, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 641, in make_context
    self.parse_args(ctx, args)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 940, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1469, in handle_parse_result
    value = self.full_process_value(ctx, value)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1438, in full_process_value
    value = self.process_value(ctx, value)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1428, in process_value
    return self.type_cast_value(ctx, value)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1417, in type_cast_value
    return _convert(value, (self.nargs != 1) + bool(self.multiple))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1415, in _convert
    return self.type(value, self, ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/types.py", line 39, in __call__
    return self.convert(value, param, ctx)
  File "/usr/local/lib/python2.7/dist-packages/gandi/cli/core/params.py", line 468, in convert
    return click.Choice.convert(self, value, param, ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/types.py", line 172, in convert
    if not self.case_sensitive:
AttributeError: 'DNSRecordsParamType' object has no attribute 'case_sensitive'

Python v3 :

# gandi dns create FQDN TXT "TXT record"
Traceback (most recent call last):
  File "/usr/local/bin/gandi", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/gandi/cli/__main__.py", line 8, in main
    cli(obj={})
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/gandi/cli/core/cli.py", line 163, in invoke
    click.Group.invoke(self, ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1135, in invoke
    sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 641, in make_context
    self.parse_args(ctx, args)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 940, in parse_args
    value, args = param.handle_parse_result(ctx, opts, args)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1469, in handle_parse_result
    value = self.full_process_value(ctx, value)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1438, in full_process_value
    value = self.process_value(ctx, value)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1428, in process_value
    return self.type_cast_value(ctx, value)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1417, in type_cast_value
    return _convert(value, (self.nargs != 1) + bool(self.multiple))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1415, in _convert
    return self.type(value, self, ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/types.py", line 39, in __call__
    return self.convert(value, param, ctx)
  File "/usr/local/lib/python3.7/dist-packages/gandi/cli/core/params.py", line 468, in convert
    return click.Choice.convert(self, value, param, ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/types.py", line 172, in convert
    if not self.case_sensitive:
AttributeError: 'DNSRecordsParamType' object has no attribute 'case_sensitive'

Gandi version

1# gandi --version
Gandi CLI 1.4
grigouze commented 5 years ago

It's fixed with master, can you test it ?

dud225 commented 5 years ago

I confirm this works. Thanks.