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:
3e6b706
)
handle App instance with no Builds when writing YAML
author
Hans-Christoph Steiner
<hans@eds.org>
Thu, 6 Jul 2017 09:24:55 +0000
(11:24 +0200)
committer
Hans-Christoph Steiner
<hans@eds.org>
Thu, 6 Jul 2017 14:00:44 +0000
(16:00 +0200)
fdroidserver/metadata.py
patch
|
blob
|
history
diff --git
a/fdroidserver/metadata.py
b/fdroidserver/metadata.py
index d832fd0cc39d32ec28f6a505055367a0618ceb52..c794a5418700f12606fe3e87c40be1bc810ee96a 100644
(file)
--- a/
fdroidserver/metadata.py
+++ b/
fdroidserver/metadata.py
@@
-1051,9
+1051,11
@@
def write_yaml(mf, app):
# next iteration will need to insert a newline
insert_newline = True
else:
# next iteration will need to insert a newline
insert_newline = True
else:
- if (hasattr(app, field) and getattr(app, field)) or field is 'Builds':
+ if app.get(field) or field is 'Builds':
+ # .txt calls it 'builds' internally, everywhere else its 'Builds'
if field is 'Builds':
if field is 'Builds':
- cm.update({field: _builds_to_yaml(app)})
+ if app.get('builds'):
+ cm.update({field: _builds_to_yaml(app)})
elif field is 'CurrentVersionCode':
cm.update({field: _field_to_yaml(TYPE_INT, getattr(app, field))})
else:
elif field is 'CurrentVersionCode':
cm.update({field: _field_to_yaml(TYPE_INT, getattr(app, field))})
else: