diff --git a/beets/util/confit.py b/beets/util/confit.py index b157c35a2..ea7d0690b 100644 --- a/beets/util/confit.py +++ b/beets/util/confit.py @@ -210,6 +210,11 @@ class ConfigView(object): def __repr__(self): return '' % self.name + def __iter__(self): + """Prevent list(config) from using __getitem__ and never halting""" + raise TypeError(u"{!r} object is not " + u"iterable".format(self.__class__.__name__)) + def __getitem__(self, key): """Get a subview of this view.""" return Subview(self, key)