Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gimme_aws_creds/duo_universal.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ def _get_duo_universal_login_form_data(self, plugin_form_response):

@staticmethod
def _find_device_to_use(doc):
device = doc.find('.//input[@name="preferred_device"]').get('value')
preferred_device_block = doc.find('.//input[@name="preferred_device"]')
device = preferred_device_block.get('value') if preferred_device_block is not None else None
if device is None or device == '':
device = doc.find('.//select[@name="device"]/option').get('value')
return device
Expand Down
Loading