def save_variable(identifier, platform, name, varname): filepath = os.path.join(workspace_path, identifier, platform, name) config_loader = FileConfigLoader(filepath) conf = config_loader.dictionary res = [x for x in conf["Variables"] if x["name"] == varname][0] res["value"] = request.data config_loader.save_config(conf) return True
def save_variable(identifier, platform, name, varname): filepath = os.path.join(workspace_path, identifier, platform, name) config_loader = FileConfigLoader(filepath) conf = config_loader.dictionary res = [x for x in conf["Variables"] if x["name"] == varname][0] res["value"] = request.data config_loader.save_config(conf) return True
def save_config(identifier, platform, name): print "saved" filepath = os.path.join(workspace_path, identifier, platform, name) config_loader = FileConfigLoader(filepath) try: newconf = json.loads(request.data) config_loader.save_config(newconf) print 'all fine' return Response(response="True", status=200) except Exception, ex: # @UnusedVariable print ex.message return Response(response="False", status=200)
def save_config(identifier, platform, name): print "saved" filepath = os.path.join(workspace_path, identifier, platform, name) config_loader = FileConfigLoader(filepath) try: newconf = json.loads(request.data) config_loader.save_config(newconf) print 'all fine' return Response(response="True", status=200) except Exception, ex: # @UnusedVariable print ex.message return Response(response="False", status=200)