From d680671719052646acc137157974d8c7ceb19deb Mon Sep 17 00:00:00 2001 From: lixiaoyong1 Date: Tue, 9 Jul 2024 16:17:56 +0800 Subject: [PATCH] Change varible type to ntype since type is a built-in function in python --- category/get_net_info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/category/get_net_info.py b/category/get_net_info.py index 6e59341..1061998 100644 --- a/category/get_net_info.py +++ b/category/get_net_info.py @@ -119,8 +119,8 @@ class NetInfo: res_list = [] for i, device in enumerate(self.__netdevice): - type = self.__netdevice[device] - if type == 'ethernet' and self.__link_status[device] == 'yes': + ntype = self.__netdevice[device] + if ntype == 'ethernet' and self.__link_status[device] == 'yes': cmd_result = Command.cmd_run("ethtool -k " + device) res_list.append(cmd_result) cmd_result = Command.cmd_run("ethtool -c " + device) @@ -223,4 +223,4 @@ class NetInfo: return list(dev_list) def get_netdevice_g(self): - return self.__netdev_ring \ No newline at end of file + return self.__netdev_ring -- Gitee