mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 10:40:12 +02: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
@ -888,7 +888,7 @@ def retrieve_string(app_dir, string, xmlfiles=None):
|
||||
continue
|
||||
xml = parse_xml(path)
|
||||
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 ''
|
||||
|
Loading…
Reference in New Issue
Block a user