mirror of
https://github.com/beetbox/beets.git
synced 2025-12-28 11:32:30 +01:00
raise error when -q and -t are supplied together
This commit is contained in:
parent
a75a524178
commit
3dbce11a25
2 changed files with 10 additions and 0 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue