updates
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user