chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f9b7a26
)
Always make sure that we don't encode None
author
Daniel Martí
<mvdan@mvdan.cc>
Sun, 7 Jun 2015 12:02:50 +0000
(14:02 +0200)
committer
Daniel Martí
<mvdan@mvdan.cc>
Sun, 7 Jun 2015 12:02:50 +0000
(14:02 +0200)
Apparently, we can have a non-nil element that has a nil text.
fdroidserver/common.py
patch
|
blob
|
history
diff --git
a/fdroidserver/common.py
b/fdroidserver/common.py
index c2eb4388d93617ee3058fd4a3fc40b41bf1ff2c4..f031b1939c250ef4893f96ca639c5d20bb8fb529 100644
(file)
--- a/
fdroidserver/common.py
+++ b/
fdroidserver/common.py
@@
-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 ''