[Zope-CVS] CVS: Products/PluggableAuthService - utils.py:1.6.2.2
Sidnei da Silva
sidnei at enfoldsystems.com
Wed Aug 17 15:51:41 EDT 2005
Update of /cvs-repository/Products/PluggableAuthService
In directory cvs.zope.org:/tmp/cvs-serv29327
Modified Files:
Tag: sidnei-challenge-protocol-chooser
utils.py
Log Message:
- Always return a tuple here
=== Products/PluggableAuthService/utils.py 1.6.2.1 => 1.6.2.2 ===
--- Products/PluggableAuthService/utils.py:1.6.2.1 Tue Aug 16 18:21:01 2005
+++ Products/PluggableAuthService/utils.py Wed Aug 17 15:51:39 2005
@@ -14,20 +14,28 @@
##############################################################################
import os
import unittest
+from types import TupleType, ListType
from Globals import package_home
+def tuplize(value):
+ if isinstance(value, TupleType):
+ return value
+ if isinstance(value, ListType):
+ return tuple(value)
+ return (value,)
+
try:
from zope.interface import providedBy
except ImportError:
def providedBy(obj):
- return obj.__implements__
+ return tuplize(obj.__implements__)
try:
from zope.interface import implementedBy
except ImportError:
def implementedBy(klass):
- return klass.__implements__
+ return tuplize(klass.__implements__)
try:
from Products.Five.bridge import fromZ2Interface
More information about the Zope-CVS
mailing list