Skip to content

Commit

Permalink
Don't crash when no argument is given
Browse files Browse the repository at this point in the history
  • Loading branch information
brunal committed Jan 6, 2015
1 parent fd2c57f commit 054488e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion beets/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 054488e

Please sign in to comment.