[Checkins] SVN: Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/pages.py Remove trash and unused functions.

Uli Fouquet uli at gnufix.de
Sun Feb 28 08:58:16 EST 2010


Log message for revision 109494:
  Remove trash and unused functions.
  

Changed:
  U   Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/pages.py

-=-
Modified: Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/pages.py
===================================================================
--- Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/pages.py	2010-02-28 13:55:36 UTC (rev 109493)
+++ Sandbox/ulif/grokui.zodbbrowser/src/grokui/zodbbrowser/pages.py	2010-02-28 13:58:15 UTC (rev 109494)
@@ -34,9 +34,7 @@
         self.obj = None
         if oid is None:
             self.obj = self.context.root
-            #self.obj = self.findClosestPersistent()
         if self.obj is None:
-
             oid = p64(int(self.request.get('oid', self.getRootOID()), 0))
             jar = self.jar()
             try:
@@ -59,16 +57,9 @@
         session['show_docs'] = self.show_docs
         return
         
-    def findClosestPersistent(self):
-        obj = removeSecurityProxy(self.context)
-        while not isinstance(obj, Persistent):
-            try:
-                obj = obj.__parent__
-            except AttributeError:
-                return None
-        return obj
-
     def getRootOID(self):
+        """Get OID of root object.
+        """
         root = self.jar().root()
         try:
             # The blessed way would be:
@@ -106,7 +97,7 @@
         """
         root_oid = self.getRootOID()
         curr = self.info
-        parent_list = [curr] #dict(name=curr.name, oid=curr.oid)]
+        parent_list = [curr]
         while True:
             parent = IObjectInfo(curr.getParent())
             if parent.obj is not None:



More information about the checkins mailing list