1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
This commit is contained in:
bjakubiak 2018-10-10 01:04:51 +02:00 committed by ansibot
parent 063a9dd911
commit e50de2c35f

View file

@ -322,6 +322,8 @@ class LinuxTCPConnectionInfo(TCPConnectionInfo):
def get_active_connections_count(self):
active_connections = 0
for family in self.source_file.keys():
if not os.path.isfile(self.source_file[family]):
continue
f = open(self.source_file[family])
for tcp_connection in f.readlines():
tcp_connection = tcp_connection.strip().split()