--- probe_printer.py 2018-06-21 10:28:31.541775363 +0300 +++ new_probe_printer.py 2018-06-21 10:29:40.594654711 +0300 @@ -146,14 +146,14 @@ return False if len(data)>0 and ord(data[0])==0: + result.append(name) try: s.send(b'\1\n') # abort job again s.close () except: pass - result.append(name) - return True + return try: s.close()