diff -u -r1.69 ZSyncer.py
--- ZSyncer.py  11 Aug 2005 20:31:29 -0000      1.69
+++ ZSyncer.py  15 Aug 2005 20:03:19 -0000
@@ -649,10 +649,10 @@
         else:
             obj_info = {}
         # Get the sub-objects.
-        if getattr(aq_base(path_object), 'isPrincipiaFolderish', 0):
-            sub_objects = path_object.objectValues()
-        elif _isZClassFolder(path_object):
+        if _isZClassFolder(path_object):
             sub_objects = path_object.propertysheets.methods.objectValues()
+        elif getattr(aq_base(path_object), 'isPrincipiaFolderish', 0):
+            sub_objects = path_object.objectValues()
         else:
             sub_objects = []
         for ob in sub_objects:
@@ -759,7 +759,7 @@
                 # not guaranteed to be correct when virtual hosting.
                 # Someday this should go away.
                 full = '/'+obj.absolute_url(relative=1)
-        except (KeyError, NotFound):
+        except (ZSyncerObjNotFound, KeyError, NotFound):
             # No object found, maybe Extra. Fall back to the original.
             full = relative = path
         request = self.REQUEST
@@ -1322,7 +1322,7 @@
         obj = self.traverseFromRoot(path)
         method = getattr(obj, method_name)
         sm = getSecurityManager()
-        if not sm.validateValue(method):
+        if not sm.validate(self, self, method_name, method):
             user = sm.getUser().getId()
             err ="User %s is not allowed to call %s here" % (user,
                                                              method_name)
@@ -1486,7 +1486,7 @@
         method_name, args, kw= loads(request)
         try:
             method = getattr(self, method_name)
-            if not getSecurityManager().validateValue(method):
+            if not getSecurityManager().validate(self, self, method_name, method):
                 raise Unauthorized
             result = method(*args, **kw)
             ok = 1
@@ -1498,7 +1498,7 @@
             # informative about it.
             self._logException('Exception in call_')
             # We want to send back the exception.
-            result = sys.exc_info()[:2]
+            result = (str(sys.exc_info()[0]), str(sys.exc_info()[1]))
             ok = 0
         return dumps((ok, result), 1)
