jp (invitation): fixed inconsistency in language handling

This commit is contained in:
Goffi 2017-06-21 08:00:14 +02:00
commit b18523e615

View file

@ -142,7 +142,8 @@ class Modify(base.CommandBase):
self.parser.add_argument("-n", "--name", type=base.unicode_decoder, default='', help='name of the invitee')
self.parser.add_argument("-N", "--host-name", type=base.unicode_decoder, default='', help='name of the host')
self.parser.add_argument("-e", "--email", type=base.unicode_decoder, default='', help='email to send the invitation to (if --no-email is set, email will just be saved)')
self.parser.add_argument("-l", "--lang", type=base.unicode_decoder, default='', help='main language spoken by the invitee')
self.parser.add_argument("-l", "--lang", dest="language", type=base.unicode_decoder, default='',
help='main language spoken by the invitee')
self.parser.add_argument("-x", "--extra", metavar=('KEY', 'VALUE'), type=base.unicode_decoder, action='append', nargs=2, default=[], help='extra data to associate with invitation/invitee')
self.parser.add_argument("-p", "--profile", type=base.unicode_decoder, default='', help="profile doing the invitation (default: don't associate profile")
self.parser.add_argument("id", type=base.unicode_decoder,
@ -159,7 +160,7 @@ class Modify(base.CommandBase):
def start(self):
extra = dict(self.args.extra)
for arg_name in ('name', 'host_name', 'email', 'lang', 'profile'):
for arg_name in ('name', 'host_name', 'email', 'language', 'profile'):
value = getattr(self.args, arg_name)
if not value:
continue