chiark / gitweb /
--create-metadata: only set default empty values if not using template.py
authorIzzy <izzysoft@qumran.org>
Sat, 8 Jul 2017 12:41:19 +0000 (14:41 +0200)
committerIzzy <izzysoft@qumran.org>
Sat, 8 Jul 2017 12:41:19 +0000 (14:41 +0200)
fdroidserver/update.py

index 37176fb8d2df365f1799e1bfc5875c7b8a56d3aa..f463b55de1877a7a0ffbec08cd9b6113f9749e7f 100644 (file)
@@ -1772,19 +1772,19 @@ def main():
                             app = yaml.load(fp)
                     else:
                         app = dict()
+                        app['Categories'] = [os.path.basename(os.getcwd())]
+                        # include some blanks as part of the template
+                        app['AuthorName'] = ''
+                        app['Summary'] = ''
+                        app['WebSite'] = ''
+                        app['IssueTracker'] = ''
+                        app['SourceCode'] = ''
+                        app['CurrentVersionCode'] = 2147483647  # Java's Integer.MAX_VALUE
                     if 'name' in apk and apk['name'] != '':
                         app['Name'] = apk['name']
                     else:
                         logging.warning(apk['packageName'] + ' does not have a name! Using package name instead.')
                         app['Name'] = apk['packageName']
-                    app['Categories'] = [os.path.basename(os.getcwd())]
-                    # include some blanks as part of the template
-                    app['AuthorName'] = ''
-                    app['Summary'] = ''
-                    app['WebSite'] = ''
-                    app['IssueTracker'] = ''
-                    app['SourceCode'] = ''
-                    app['CurrentVersionCode'] = 2147483647  # Java's Integer.MAX_VALUE
                     yaml.dump(app, f, default_flow_style=False)
                     logging.info("Generated skeleton metadata for " + apk['packageName'])
                     newmetadata = True