output=str(subprocess.Popen(['netcat','localhost','7634'],stdout=subprocess.PIPE,stderr=subprocess.STDOUT).communicate()[0])#получаем output от hddtemp
output=str(subprocess.Popen(['netcat','-d','localhost','7634'],stdout=subprocess.PIPE,stderr=subprocess.STDOUT).communicate()[0])#получаем output от hddtemp
#b'|/dev/sda2|ST340014A|41|C|'
ifoutput=="b''":
print('Hddtemp output is empty, make sure it is running. If not, launch it: #systemctl start hddtemp.service')