mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
Merge pull request #833 from YunoHost/force-level-if-not-working
force level if not working
This commit is contained in:
commit
7511f90076
1 changed files with 6 additions and 2 deletions
|
@ -29,7 +29,11 @@ if __name__ == '__main__':
|
|||
if not 0 <= int(level) <= 10:
|
||||
print "Error: app level must be between 0 and 10, it's '%s'" % level
|
||||
sys.exit(1)
|
||||
|
||||
app_list[app_id]["level"] = int(level)
|
||||
|
||||
if app_list[app_id]["state"] == "working":
|
||||
app_list[app_id]["level"] = int(level)
|
||||
elif "level" in app_list[app_id]:
|
||||
print "Warning: app '%s' is currently not marked as working, the level is removed" % app_id
|
||||
del app_list[app_id]["level"]
|
||||
|
||||
open(app_list_name, "w").write("\n".join(json.dumps(app_list, indent=4, sort_keys=True).split(" \n")) + "\n")
|
||||
|
|
Loading…
Add table
Reference in a new issue