From 8654230bb22f1382b18edabfd0489a21a014fd7b Mon Sep 17 00:00:00 2001 From: Nathaniel Clark Date: Thu, 9 Dec 2021 09:16:53 -0500 Subject: [PATCH] Fix review comments Signed-off-by: Nathaniel Clark --- plugins/router/arris-sb6183 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/router/arris-sb6183 b/plugins/router/arris-sb6183 index e3898da0..e321f56b 100755 --- a/plugins/router/arris-sb6183 +++ b/plugins/router/arris-sb6183 @@ -77,21 +77,22 @@ GPLv2 =cut """ -import re -import os -import sys import ctypes +import os +import re +import sys from urllib import request -def fixint(i): - return ctypes.c_uint32(int(i)).value - HOSTNAME = os.getenv("hostname", None) STATUS_URL = "http://192.168.100.1/RgConnect.asp" INFO_URL = "http://192.168.100.1/RgSwInfo.asp" UPCOUNT = 4 DOWNCOUNT = 16 +# Recast an int32 to uint32 +def fixint(i): + return ctypes.c_uint32(int(i)).value + if len(sys.argv) == 2: if sys.argv[1] == "config": if HOSTNAME: