Update the style of messages.
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user