On 08/15/2013 04:03 PM, Petr Vobornik wrote:
> +        if is_visible:
> +            is_enabled = 'disabled' not in 
> link.get_attribute("class").split(' ')

Nitpick: it would be better to use .split() without arguments here. Here's an
example that illustrates the difference in behavior between .split() and split('
') (e.g. if there are multiple spaces between class names):

>>> 'class1  class2 class3     class4'.split()
['class1', 'class2', 'class3', 'class4']
>>> 'class1  class2 class3     class4'.split(' ')
['class1', '', 'class2', 'class3', '', '', '', '', 'class4']

ACK with this change.


Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

Freeipa-devel mailing list

Reply via email to