From 7eba3db0054c8a6a7e915b357f072983cb94bcf9 Mon Sep 17 00:00:00 2001 From: Mohammed Al Sahaf Date: Sat, 15 Sep 2018 20:56:08 +0300 Subject: [PATCH] Fix merge conflict resolution mistake (duplicate get_update_status) --- cps/web.py | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/cps/web.py b/cps/web.py index 821fdf2e..e82aced7 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1040,35 +1040,6 @@ def get_tags_json(): return json_dumps -@app.route("/get_updater_status", methods=['GET', 'POST']) -@login_required -@admin_required -def get_updater_status(): - status = {} - if request.method == "POST": - commit = request.form.to_dict() - if "start" in commit and commit['start'] == 'True': - text = { - "1": _(u'Requesting update package'), - "2": _(u'Downloading update package'), - "3": _(u'Unzipping update package'), - "4": _(u'Files are replaced'), - "5": _(u'Database connections are closed'), - "6": _(u'Server is stopped'), - "7": _(u'Update finished, please press okay and reload page') - } - status['text'] = text - helper.updater_thread = helper.Updater() - helper.updater_thread.start() - status['status'] = helper.updater_thread.get_update_status() - elif request.method == "GET": - try: - status['status'] = helper.updater_thread.get_update_status() - except Exception: - status['status'] = 7 - return json.dumps(status) - - @app.route("/get_languages_json", methods=['GET', 'POST']) @login_required_if_no_ano def get_languages_json():