Merge pull request #1207 from brunal/master

Don't crash when no argument is given
This commit is contained in:
Adrian Sampson 2015-01-06 11:24:28 -08:00
commit 5add272916

View file

@ -924,7 +924,8 @@ def _raw_main(args, lib=None):
# Special case for the `config --edit` command: bypass _setup so
# that an invalid configuration does not prevent the editor from
# starting.
if subargs[0] == 'config' and ('-e' in subargs or '--edit' in subargs):
if subargs and subargs[0] == 'config' \
and ('-e' in subargs or '--edit' in subargs):
from beets.ui.commands import config_edit
return config_edit()