def POST(self): data = webdotpyparselib.webdataintodict( webdotpyparselib.webdataintoascii(web.data())) if len(data["id"]) < 1: return json.dumps({ "success": False, "message": "No ID number was passed to this function." }) data["id"] = int(data["id"]) try: result = ardustatlibrary.shutdown(data["id"]) except: if enabledebugging == True: raise return json.dumps({ "success": False, "message": "Shutting down failed unexpectedly. (If you are on a unix system, open a terminal and type \"killall " + pycommand + "\". If you are on Windows, press ctrl-alt-del to open up task manager, go to the \"processes\" tab, and kill all the processes that are named \"python.exe\"." }) else: sys.exit()
def POST(self): data = webdotpyparselib.webdataintodict( webdotpyparselib.webdataintoascii(web.data())) if len(data["id"]) < 1: return json.dumps({ "success": False, "message": "No ID number was passed to this function." }) data["id"] = int(data["id"]) try: result = ardustatlibrary.shutdown(data["id"]) except: if enabledebugging == True: raise return json.dumps({ "success": False, "message": "Shutting down failed unexpectedly." }) else: if result["success"] == True: return json.dumps({ "success": True, "message": "Shutting down:\n" + result["message"] }) else: return json.dumps({ "success": False, "message": "Shutting down failed with message:\n" + result["message"] })
def POST(self): data = webdotpyparselib.webdataintodict(webdotpyparselib.webdataintoascii(web.data())) if len(data["id"]) < 1: return json.dumps({"success":False,"message":"No ID number was passed to this function."}) data["id"] = int(data["id"]) try: result = ardustatlibrary.shutdown(data["id"]) except: if enabledebugging == True: raise return json.dumps({"success":False,"message":"Shutting down failed unexpectedly. (If you are on a unix system, open a terminal and type \"killall "+pycommand+"\". If you are on Windows, press ctrl-alt-del to open up task manager, go to the \"processes\" tab, and kill all the processes that are named \"python.exe\"."}) else: sys.exit()
def POST(self): data = webdotpyparselib.webdataintodict(webdotpyparselib.webdataintoascii(web.data())) if len(data["id"]) < 1: return json.dumps({"success":False,"message":"No ID number was passed to this function."}) data["id"] = int(data["id"]) try: result = ardustatlibrary.shutdown(data["id"]) except: if enabledebugging == True: raise return json.dumps({"success":False,"message":"Shutting down failed unexpectedly."}) else: if result["success"] == True: return json.dumps({"success":True,"message":"Shutting down:\n"+result["message"]}) else: return json.dumps({"success":False,"message":"Shutting down failed with message:\n"+result["message"]})