summaryrefslogtreecommitdiff
diff options
-rwxr-xr-xbin/gateway_ping_test11
1 files changed, 2 insertions, 9 deletions
diff --git a/bin/gateway_ping_test b/bin/gateway_ping_test
index 1666ce5..5ba37e9 100755
--- a/bin/gateway_ping_test
+++ b/bin/gateway_ping_test
@@ -18,13 +18,6 @@ class Route:
Gets routing information from the system.
"""
- # auxiliary functions
- def _hex_to_dec(self, string):
- """
- Returns the integer value of a hexadecimal string s
- """
- return int(string, 16)
-
def _num_to_dotted_quad(self, number):
"""
Convert long int to dotted quad string
@@ -48,8 +41,8 @@ class Route:
w = h.search(route)
if w:
if w.group("def_gateway"):
- return (self._num_to_dotted_quad(
- self._hex_to_dec(w.group("def_gateway"))))
+ return self._num_to_dotted_quad(
+ int(w.group("def_gateway"), 16))
else:
logging.error(_("Could not find def gateway info in /proc"))
return None