From b9fdfba00d5480d3cd3a6023f554c4d3585fd586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Chac=C3=B3n?= Date: Thu, 8 Sep 2022 04:42:45 -0600 Subject: [PATCH] Revert https://github.com/rchac/LibreQoS/commit/bf09a38d353f42ca224aa0a9c5aeea436dcd4a50 & Require >= 3Mbps --- v1.2/LibreQoS.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/v1.2/LibreQoS.py b/v1.2/LibreQoS.py index 233c5b68..98feabc2 100644 --- a/v1.2/LibreQoS.py +++ b/v1.2/LibreQoS.py @@ -93,18 +93,26 @@ def refreshShapers(): raise Exception("Provided IPv6 '" + ipv6_input + "' in ShapedDevices.csv at row " + str(rowNum) + " is not valid.") from e try: a = int(downloadMin) + if a <=2: + raise Exception("Provided downloadMin '" + downloadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is <=2.") except ValueError as e: raise Exception("Provided downloadMin '" + downloadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.") from e try: a = int(uploadMin) + if a <=2: + raise Exception("Provided uploadMin '" + uploadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is <=2.") except ValueError as e: raise Exception("Provided uploadMin '" + uploadMin + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.") from e try: a = int(downloadMax) + if a <=2: + raise Exception("Provided downloadMax '" + downloadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is <=2.") except ValueError as e: raise Exception("Provided downloadMax '" + downloadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.") from e try: a = int(uploadMax) + if a <=2: + raise Exception("Provided uploadMax '" + uploadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is <=2.") except ValueError as e: raise Exception("Provided uploadMax '" + uploadMax + "' in ShapedDevices.csv at row " + str(rowNum) + " is not a valid integer.") from e rowNum += 1 @@ -403,13 +411,8 @@ def refreshShapers(): f.write(f"{line}\n") shell("/sbin/tc -f -b linux_tc.txt") - xdpCommandString = "" for command in xdpCPUmapCommands: - xdpCommandString = xdpCommandString + command + "\n" - - if enableActualShellCommands: - process = subprocess.Popen('/bin/bash', stdin=subprocess.PIPE, stdout=subprocess.PIPE) - out, err = process.communicate(xdpCommandString.encode('utf-8')) + shell(command) #Recap for circuit in subscriberCircuits: