Update the style of messages.

main
KKlochko 1 year ago
parent 03f633e5ab
commit d536d7cb34

@ -53,9 +53,9 @@ class ProducerClient:
try: try:
while True: while True:
print('Your notification: ') self.console.print('\n[cyan b]Your notification[/]: ')
title = input('title: ') title = Prompt.ask('[cyan]title[/]')
message = input('message: ') message = Prompt.ask('[cyan]message[/]')
await self.send_notification(title, message) await self.send_notification(title, message)
if title == '' and message == '': if title == '' and message == '':
@ -66,8 +66,8 @@ class ProducerClient:
except asyncio.CancelledError: except asyncio.CancelledError:
pass pass
except KeyboardInterrupt: except KeyboardInterrupt:
print("\nbye")
await self.send_notification('', '') await self.send_notification('', '')
self.console.print("\n[green]bye[/]")
sys.exit(0) sys.exit(0)
finally: finally:
self.writer.close() self.writer.close()

Loading…
Cancel
Save