d8e4b18
@@ -342,7 +342,7 @@
plugins = self._site[FACILITY]
if plugins.enabled:
first = plugins.enabled[0]
- plugin = plugins.available[first]
+ plugin = plugins.available.get(first)
return plugin
def root(self, *args, **kwargs):
if a plugin is enabled it should definitely be available, in what case this fails ?
I had an older install when we were still using mod_auth_kerb and the login plugin was named krb. I upgraded and krb was still enabled but there was no login plugin name krb so it blew up. This type of thing should be rare and otherwise handled during an upgrade but I'm just tightening up the code a bit.
Ok but won't thi end up returning a None, instead of the first available plugin ?
Sounds to me like the fix retquires to find the first available plugin and remove any bad entry from the enabled list ?
If it returns None then the root page will fallback to displaying the Login page which is fine IMHO. My goal was only to make it not crash since this is an unlikely scenario.
ack
This has been merged, thanks.