This is needed for the upcoming metadata formats: JSON, XML, etc.
return [v for v in l if v]
return [v for v in l if v]
+def get_default_app_info_list():
+ thisinfo = {}
+ thisinfo.update(app_defaults)
+
+ # General defaults...
+ thisinfo['builds'] = []
+ thisinfo['comments'] = []
+
+ return thisinfo
+
+
# Parse metadata for a single application.
#
# 'metafile' - the filename to read. The package id for the application comes
# Parse metadata for a single application.
#
# 'metafile' - the filename to read. The package id for the application comes
thisinfo['comments'].append((key, comment))
del curcomments[:]
thisinfo['comments'].append((key, comment))
del curcomments[:]
+ thisinfo = get_default_app_info_list()
if metafile:
if not isinstance(metafile, file):
metafile = open(metafile, "r")
appid = metafile.name[9:-4]
if metafile:
if not isinstance(metafile, file):
metafile = open(metafile, "r")
appid = metafile.name[9:-4]
-
- thisinfo.update(app_defaults)
- thisinfo['id'] = appid
-
- # General defaults...
- thisinfo['builds'] = []
- thisinfo['comments'] = []
-
- if metafile is None:
+ thisinfo['id'] = appid
+ else:
return appid, thisinfo
mode = 0
return appid, thisinfo
mode = 0