def select_pull(data): inst = getInstalledApps() for package in data['list']: try: inst.get_app(package) socketio.emit("pull_result", {"package_name":package,"result":"SDK_EXIST" if inst.is_AWSSDK(package) else "SDK_NO_EXIST"}, namespace="/installed") except Exception as e: socketio.emit("pull_result", {"package_name":package,"result":"ERROR", "msg":str(e)}, namespace="/installed")
def installed_layout(): package_list = [] try: inst = getInstalledApps() packages = inst.get_Applist() for p in packages: if downfile_check(p): if inst.is_AWSSDK(p): package_list.append({"package_name":p, "status": "SDK_EXIST"}) else: package_list.append({"package_name":p, "status": "SDK_NO_EXIST"}) else: package_list.append({"package_name":p, "status": ""}) return render_template("installed.html", result=package_list) except: return render_template("installed.html", result=package_list)