Hi,

Dne 6.8.2015 v 14:29 Martin Babinsky napsal(a):
This bug was discovered when writing tests for functionality introduced
in my PATCH 0051.

This patch should apply on top of PATCH 0051.

This whole patch can be reduced to:

         except core.KnobValueError as e:
             knob_cls = getattr(transformed_cls, e.name)
             try:
-                index = self.positional_arguments.index(e.name)
-            except IndexError:
+                if self.positional_arguments:
+                    index = self.positional_arguments.index(e.name)
+                else:
+                    raise ValueError
+            except ValueError:
                 cli_name = knob_cls.cli_name or e.name.replace('_', '-')
                 desc = "option --{0}".format(cli_name)
             else:

Honza

--
Jan Cholasta

--
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to