From 1f46ff4604c5e95e2ccc63c403681efbcbc6c034 Mon Sep 17 00:00:00 2001 From: Bruno Tournay Date: Mon, 3 Feb 2014 22:17:57 +0100 Subject: [PATCH] In beet modify: don't ask for confirmation if there is nothing to do --- beets/ui/commands.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 487c76709..8c3661171 100644 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -1155,11 +1155,16 @@ def modify_items(lib, mods, query, write, move, album, confirm): if _showdiff(field, obj.get(field), value): changed.add(obj) - # Confirm. - if confirm: - extra = ' and write tags' if write else '' - if not ui.input_yn('Really modify%s (Y/n)?' % extra): - return + # Still something to do? + if not changed: + print_('No modification to perform.') + return + else: + # Confirm. + if confirm: + extra = ' and write tags' if write else '' + if not ui.input_yn('Really modify%s (Y/n)?' % extra): + return # Apply changes to database. with lib.transaction():