From 054488e1ab0806822e3956b0ef8153e3604bc8b9 Mon Sep 17 00:00:00 2001 From: Bruno Cauet Date: Tue, 6 Jan 2015 16:32:43 +0100 Subject: [PATCH] Don't crash when no argument is given --- beets/ui/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/beets/ui/__init__.py b/beets/ui/__init__.py index a69b98ac2d..ebde7ebbfe 100644 --- a/beets/ui/__init__.py +++ b/beets/ui/__init__.py @@ -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()