def updateSoftwareVersion(self,data,sendResponse): if 'release_ids' in data: if softwareManager.updateSoftware(data['release_ids']): sendResponse({'success': 'no_error'}) return sendResponse("error_init_update", True)
def updateSoftwareVersion(self, data, sendResponse): total, used, free = platformManager().driveStats() if free > 1073741824: # 1 GB if 'release_ids' in data: if softwareManager.updateSoftware(data['release_ids']): sendResponse({'success': 'no_error'}) return else: sendResponse("error_insufficient_storage", True) return sendResponse("error_init_update", True)
def updateSoftwareVersion(): if request.method == 'DELETE': softwareManager.resetUpdate() return jsonify() else: data = request.get_json() if 'release_ids' in data: if softwareManager.updateSoftware(data['release_ids']): return jsonify() else: return ("Unable to update", 500) else: return ("Invalid data", 400)
def updateSoftwareVersion(): if request.method == 'DELETE': softwareManager.resetUpdate() return jsonify() else: data = request.get_json() total, used, free = platformManager().driveStats() if free > 1073741824: # 1 GB if 'release_ids' in data: if softwareManager.updateSoftware(data['release_ids']): return jsonify() else: return ("Unable to update", 500) else: return ("Invalid data", 400) else: return ("Not enough space", 507)