Skip to content

Commit

Permalink
Fix bug in login.py
Browse files Browse the repository at this point in the history
It was searching for an <img> tag that is a direct child of <form>, when it should search
for *any descendant.*
  • Loading branch information
mehaase committed Mar 14, 2019
1 parent af3d25c commit 07da75d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starbelly/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def get_captcha_image_element(form):
:param form: An lxml form element.
:returns: An lxml image element.
'''
img_el = form.find('img')
img_el = form.find('.//img')
if img_el is None:
raise Exception('Cannot locate CAPTCHA image')
return img_el
Expand Down

0 comments on commit 07da75d

Please sign in to comment.