Make categories required

failure
Marek Ventur 2018-07-22 11:34:07 +01:00
parent c0364e333f
commit 992d00dc0f
2 changed files with 5 additions and 1 deletions

View File

@ -189,8 +189,11 @@ def _validate_resource(path, resource):
# Metadata check
if resource['type'] in ["app", "lib"]:
pass #todo: what exactly are we're making required?
pass #todo: should we make license required?
if resource['type'] == "app":
if 'categories' not in resource or (not isinstance(resource['categories'], list)) or len(resource['categories']) == 0:
resource.setdefault("errors", []).append("___categories___ list is required in main.py but not found")
"""
helpers

View File

@ -5,6 +5,7 @@ To publish apps use https://badge.emfcamp.org"""
___license___ = "MIT"
___name___ = "App Library"
___dependencies___ = ["wifi", "dialogs"]
___categories___ = ["System"]
___bootstrapped___ = True
import pyb