diff --git a/beets/ui/commands.py b/beets/ui/commands.py index 73bc09969..8141e473b 100755 --- a/beets/ui/commands.py +++ b/beets/ui/commands.py @@ -416,6 +416,10 @@ def import_files(lib, paths, copy, write, autot, logpath, art, threaded, if not os.path.isdir(syspath(path)): raise ui.UserError('not a directory: ' + path) + # Check parameter consistency. + if quiet and timid: + raise ui.UserError("can't be both quiet and timid") + # Open the log. if logpath: logfile = open(logpath, 'w') diff --git a/test/test_ui.py b/test/test_ui.py index 756198855..f56d45c32 100644 --- a/test/test_ui.py +++ b/test/test_ui.py @@ -164,6 +164,12 @@ class AutotagTest(unittest.TestCase): self.io.addinput('u') self._no_candidates_test(importer.action.ASIS) +class ImportTest(unittest.TestCase): + def test_quiet_timid_disallowed(self): + self.assertRaises(ui.UserError, commands.import_files, + None, [], False, False, False, None, False, False, + False, False, True, False, None, False, True) + class InputTest(unittest.TestCase): def setUp(self): self.io = _common.DummyIO()