From 3b9f9bdcc743df0e7af769a332d9badd6c054a03 Mon Sep 17 00:00:00 2001 From: Kayou Date: Sun, 6 Oct 2019 19:02:10 +0200 Subject: [PATCH] force level if not working --- change_level.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/change_level.py b/change_level.py index 6f3ef108..b18cf814 100755 --- a/change_level.py +++ b/change_level.py @@ -29,6 +29,10 @@ 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) + + if app_list[app_id]["state"] == "notworking": + print "Warning: app '%s' is currently marked as not working, the level is forced to 0" % app_id + level = 0 app_list[app_id]["level"] = int(level)