Skip to content

Commit bae54d2

Browse files
committed
py: Fixing Firefox extension ID extraction.
Some extensions (e.g foxyproxy) declare rdf namespace twice -- as a named namespace and as a default one. So we have to make two attempts to read this section.
1 parent 2c780f9 commit bae54d2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: py/selenium/webdriver/firefox/firefox_profile.py

+2
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ def get_text(element):
356356
rdf = get_namespace_id(doc, 'http://www.w3.org/1999/02/22-rdf-syntax-ns#')
357357

358358
description = doc.getElementsByTagName(rdf + 'Description').item(0)
359+
if description is None:
360+
description = doc.getElementsByTagName('Description').item(0)
359361
for node in description.childNodes:
360362
# Remove the namespace prefix from the tag for comparison
361363
entry = node.nodeName.replace(em, "")

0 commit comments

Comments
 (0)