diff --git a/beets/importer.py b/beets/importer.py index 51d3f796c..88bfb047a 100644 --- a/beets/importer.py +++ b/beets/importer.py @@ -341,7 +341,7 @@ def apply_choices(config): while True: task = yield # Don't do anything if we're skipping the album or we're done. - if task.choice_flag == action.SKIP or task.sentinel: + if task.sentinel or task.choice_flag == action.SKIP: if config.resume is not False: task.save_progress() continue diff --git a/test/test_importer.py b/test/test_importer.py index be6ecb954..ccbbc3d90 100644 --- a/test/test_importer.py +++ b/test/test_importer.py @@ -99,6 +99,12 @@ class ImportApplyTest(unittest.TestCase, _common.ExtraAsserts): os.path.join(self.libdir, self.lib.path_formats['singleton']+'.mp3') ) + def test_apply_sentinel(self): + coro = importer.apply_choices(_common.iconfig(self.lib)) + coro.next() + coro.send(importer.ImportTask.done_sentinel('toppath')) + # Just test no exception for now. + class DuplicateCheckTest(unittest.TestCase): def setUp(self): self.lib = library.Library(':memory:')