confirm before delete_mine
This commit is contained in:
parent
74ed236420
commit
5e69b9bbfd
@ -165,6 +165,11 @@ class BBS():
|
|||||||
|
|
||||||
def delete_mine(self, args):
|
def delete_mine(self, args):
|
||||||
'''Delete all messages addressed to user'''
|
'''Delete all messages addressed to user'''
|
||||||
|
self.write_output("Delete all messages addressed to you? Y/N:")
|
||||||
|
response = sys.stdin.readline().strip()
|
||||||
|
if response.lower() != "y":
|
||||||
|
return
|
||||||
|
else:
|
||||||
with Session(self.engine) as session:
|
with Session(self.engine) as session:
|
||||||
try:
|
try:
|
||||||
statement = delete(Message).where(Message.recipient == self.calling_station).returning(Message)
|
statement = delete(Message).where(Message.recipient == self.calling_station).returning(Message)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user