Skip to content

Commit

Permalink
More readable code in DB console [no_ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Kseen715 committed Aug 18, 2024
1 parent 8f28707 commit 66f05b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/db_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ def drop(parameters, arguments):
data_pick = data_pick[data_pick['comment'].fillna('').str.contains(arguments['comment-part'])]
data_drop = read_csv(DB_FILE)
Logger.info(f"Dropping {len(data_pick)} entries")
ans = None
answer = None
if len(data_pick) != 0:
ans = input(f"{colorama.Fore.RED}ARE YOU SURE "\
answer = input(f"{colorama.Fore.RED}ARE YOU SURE "\
+ f"you want to DROP {len(data_pick)} entries? [y/N]{colorama.Style.RESET_ALL}")
if ans.lower() != 'y':
if answer.lower() != 'y':
Logger.info("Aborted")
return
data_drop = data_drop[~data_drop.isin(data_pick)].dropna()
Expand Down

0 comments on commit 66f05b9

Please sign in to comment.