Author: chrisz
Date: Mon Jan 17 14:34:21 2011
New Revision: 7208
URL: http://trac.turbogears.org/changeset/7208

Log:
Prevent exception when no identity sources have been set.

Modified:
   branches/1.5/turbogears/identity/visitor.py

Modified: branches/1.5/turbogears/identity/visitor.py
==============================================================================
--- branches/1.5/turbogears/identity/visitor.py Mon Jan 17 13:48:51 2011        
(r7207)
+++ branches/1.5/turbogears/identity/visitor.py Mon Jan 17 14:34:21 2011        
(r7208)
@@ -85,8 +85,8 @@
         # Sources for identity information and the order in which they should 
be
         # checked. These terms are mapped to methods by prepending
         # "identity_from_".
-        sources = [s.strip() for s in
-            get('identity.source', 'form,http_auth,visit').split(',')]
+        sources = get('identity.source', 'form,http_auth,visit') or ''
+        sources = [s.strip() for s in sources.split(',')]
         self.identity_sources = list()
         for s in sources:
             if s:

Reply via email to