[CMF-checkins] CVS: CMF/DCWorkflow - Worklists.py:1.4

Florent Guillaume fg@nuxeo.com
Sun, 21 Jul 2002 09:24:51 -0400


Update of /cvs-repository/CMF/DCWorkflow
In directory cvs.zope.org:/tmp/cvs-serv6844

Modified Files:
	Worklists.py 
Log Message:
When upgrading old worklists, check type against not TupleType instead
of is StringType just in case UnicodeType caused problems.


=== CMF/DCWorkflow/Worklists.py 1.3 => 1.4 ===
 from Guard import Guard
 from utils import _dtmldir
 from string import split, strip, join
-
-StringType = type('')
+from types import TupleType
 
 class WorklistDefinition (SimpleItem):
     meta_type = 'Worklist'
@@ -78,7 +77,7 @@
     def getVarMatch(self, id):
         if self.var_matches:
             matches = self.var_matches.get(id, ())
-            if type(matches) is StringType:
+            if not isinstance(matches, TupleType):
                 # Old version, convert it.
                 matches = (matches,)
                 self.var_matches[id] = matches