From 30a2dd99988e20b411e5079c2cee34c69f6b43e4 Mon Sep 17 00:00:00 2001 From: Ruben De Smet Date: Thu, 26 Nov 2020 13:05:10 +0100 Subject: [PATCH] assert False on unknown move operation --- beets/library.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/beets/library.py b/beets/library.py index dea2a937e..a060e93d6 100644 --- a/beets/library.py +++ b/beets/library.py @@ -756,11 +756,7 @@ class Item(LibModel): plugins.send("item_reflinked", item=self, source=self.path, destination=dest) else: - plugins.send("before_item_moved", item=self, source=self.path, - destination=dest) - util.move(self.path, dest) - plugins.send("item_moved", item=self, source=self.path, - destination=dest) + assert False, 'unknown MoveOperation' # Either copying or moving succeeded, so update the stored path. self.path = dest @@ -1106,7 +1102,7 @@ class Album(LibModel): elif operation == MoveOperation.REFLINK_AUTO: util.reflink(old_art, new_art, fallback=True) else: - util.move(old_art, new_art) + assert False, 'unknown MoveOperation' self.artpath = new_art def move(self, operation=MoveOperation.MOVE, basedir=None, store=True):