This commit is contained in:
John Lancaster
2024-06-16 00:25:23 -05:00
parent 28108567b3
commit db14acfe2d
3 changed files with 33 additions and 35 deletions

View File

@@ -9,16 +9,10 @@ console = Console()
print = console.print
with socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) as sock:
try:
sock.connect('/run/example.sock')
except Exception:
raise
else:
with console.status('Connected...'):
while True:
try:
sleep(0.1)
except KeyboardInterrupt:
break
finally:
print('Exiting')
sock.connect('/run/example.sock')
with console.status('Connected...'):
while True:
try:
sleep(0.1)
except KeyboardInterrupt:
break