mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-06 07:20:29 +03:00
Always make sure that we don't encode None
Apparently, we can have a non-nil element that has a nil text.
This commit is contained in:
parent
f9b7a260af
commit
4db4a86420
1 changed files with 1 additions and 1 deletions
|
|
@ -888,7 +888,7 @@ def retrieve_string(app_dir, string, xmlfiles=None):
|
||||||
continue
|
continue
|
||||||
xml = parse_xml(path)
|
xml = parse_xml(path)
|
||||||
element = xml.find('string[@name="' + name + '"]')
|
element = xml.find('string[@name="' + name + '"]')
|
||||||
if element is not None:
|
if element is not None and element.text is not None:
|
||||||
return retrieve_string(app_dir, element.text.encode('utf-8'), xmlfiles)
|
return retrieve_string(app_dir, element.text.encode('utf-8'), xmlfiles)
|
||||||
|
|
||||||
return ''
|
return ''
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue