Index: /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.py
===================================================================
--- /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.py	(revision 1583)
+++ /quintagroup.transmogrifier/trunk/quintagroup/transmogrifier/portlets.py	(revision 1584)
@@ -12,7 +12,6 @@
 
 from plone.portlets.interfaces import ILocalPortletAssignable, IPortletManager,\
-    IPortletAssignmentMapping, IPortletAssignment, ILocalPortletAssignmentManager
-from plone.portlets.constants import USER_CATEGORY, GROUP_CATEGORY, \
-    CONTENT_TYPE_CATEGORY, CONTEXT_CATEGORY
+    IPortletAssignmentMapping, IPortletAssignment
+from plone.portlets.constants import CONTEXT_CATEGORY
 from plone.app.portlets.interfaces import IPortletTypeInterface
 from plone.app.portlets.exportimport.interfaces import IPortletAssignmentExportImportHandler
@@ -59,6 +58,6 @@
                 for elem in self.exportAssignments(obj):
                     root.appendChild(elem)
-                for elem in self.exportBlacklists(obj):
-                    root.appendChild(elem)
+                #for elem in self.exportBlacklists(obj)
+                    #root.appendChild(elem)
                 if root.hasChildNodes():
                     self.doc.appendChild(root)
@@ -78,4 +77,7 @@
         for manager_name, manager in self.portlet_managers:
             mapping = queryMultiAdapter((obj, manager), IPortletAssignmentMapping)
+            if mapping is None:
+                continue
+
             mapping = mapping.__of__(obj)
 
@@ -104,28 +106,4 @@
         return assignments
 
-    def exportBlacklists(self, obj):
-        assignments = []
-        for manager_name, manager in self.portlet_managers:
-            assignable = queryMultiAdapter((obj, manager), ILocalPortletAssignmentManager)
-            if assignable is None:
-                continue
-            for category in (USER_CATEGORY, GROUP_CATEGORY, CONTENT_TYPE_CATEGORY, CONTEXT_CATEGORY,):
-                child = self.doc.createElement('blacklist')
-                child.setAttribute('manager', manager_name)
-                child.setAttribute('category', category)
-            
-                status = assignable.getBlacklistStatus(category)
-                if status == True:
-                    child.setAttribute('status', u'block')
-                elif status == False:
-                    child.setAttribute('status', u'show')
-                else:
-                    child.setAttribute('status', u'acquire')
-                    
-                assignments.append(child)
-
-        return assignments
-
-
 class PortletsImporterSection(object):
     classProvides(ISectionBlueprint)
@@ -138,5 +116,4 @@
         self.pathkey = defaultMatcher(options, 'path-key', name, 'path')
         self.fileskey = defaultMatcher(options, 'files-key', name, 'files')
-        self.purge = options.get('purge', 'false').strip().lower() == 'true' and True or False
 
     def __iter__(self):
@@ -155,12 +132,4 @@
             if obj is None:         # path doesn't exist
                 yield item; continue
-
-            # Purge assignments if 'purge' option set to true
-            if self.purge:
-                for name, portletManager in getUtilitiesFor(IPortletManager):
-                    assignable = queryMultiAdapter((obj, portletManager), IPortletAssignmentMapping)
-                    if assignable is not None:
-                        for key in list(assignable.keys()):
-                            del assignable[key]
 
             if ILocalPortletAssignable.providedBy(obj):
@@ -172,6 +141,6 @@
                     if elem.nodeName == 'assignment':
                         self.importAssignment(obj, elem)
-                    elif elem.nodeName == 'blacklist':
-                        self.importBlacklist(obj, elem)
+                    #elif elem.nodeName == 'blacklist':
+                        #self.importBlacklist(obj, elem)
 
             yield item
@@ -186,4 +155,6 @@
         manager = getUtility(IPortletManager, manager_name)
         mapping = getMultiAdapter((obj, manager), IPortletAssignmentMapping)
+        if mapping is None:
+            return
 
         # 2. Either find or create the assignment
@@ -212,23 +183,4 @@
         assignment_handler = IPortletAssignmentExportImportHandler(assignment)
         assignment_handler.import_assignment(portlet_interface, node)
-
-    def importBlacklist(self, obj, node):
-        """ Import a blacklist from a node
-        """
-        manager = node.getAttribute('manager')
-        category = node.getAttribute('category')
-        status = node.getAttribute('status')
-        
-        manager = getUtility(IPortletManager, name=manager)
-        
-        assignable = queryMultiAdapter((obj, manager), ILocalPortletAssignmentManager)
-        
-        if status.lower() == 'block':
-            assignable.setBlacklistStatus(category, True)
-        elif status.lower() == 'show':
-            assignable.setBlacklistStatus(category, False)
-        elif status.lower() == 'acquire':
-            assignable.setBlacklistStatus(category, None)
-
 
 logger = logging.getLogger('quintagroup.transmogrifier.portletsimporter')
