diff piecrust/data/filters.py @ 5:474c9882decf

Upgrade to Python 3.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 11 Aug 2014 22:36:47 -0700
parents f485ba500df3
children 4379d8f8f831
line wrap: on
line diff
--- a/piecrust/data/filters.py	Mon Aug 11 22:36:36 2014 -0700
+++ b/piecrust/data/filters.py	Mon Aug 11 22:36:47 2014 -0700
@@ -30,7 +30,7 @@
             self.root_clause = AndBooleanClause()
 
     def _addClausesFromConfigRecursive(self, config, parent_clause):
-        for key, val in config.iteritems():
+        for key, val in config.items():
             if key == 'and':
                 if not isinstance(val, list) or len(val) == 0:
                     raise Exception("The given boolean 'AND' filter clause "
@@ -145,7 +145,7 @@
             return False
 
         if self.coercer:
-            actual_value = map(self.coercer, actual_value)
+            actual_value = list(map(self.coercer, actual_value))
 
         return self.value in actual_value