else:
if '.194.254' in output:
for line in ip_mac_lines:
if '0100' not in line:
ok = line.split()
f = operator.itemgetter(1)
okk = str(f(ok))
okk = okk.replace("'", "")
okk = re.sub(r'[\(\)]', '', str(okk))
okk = okk.replace(".", "")
if '01' in okk:
okk = okk[2:]
with open('DHCP_pool.txt', 'a') as file:
file.write(okk + '\n')
connection.send_command('clear ip dhcp binding *')
with open('DHCP_pool.txt', 'r') as file:
END = file.read()
send_email(f"В магазине {hostname} забился пул ip-адресов: \n{END}")